I believe that you need to provide us with more information as it sounds like you have a bunch of code for a custom rolled application. However, generically speaking you can do a few things. You can define the calling methods to include a logging function. Ie every time a
db_get() is called, have it run the logger function and then do the
db_get(). This can also mean that if the read calls are always called via the same method (assuming its OO) or via the same function, you can add a logging hook to the function. Or if you are feeling really frisky, you can always edit the
BerkDB module (assuming that is the one you are using to access the tied hash interface). Although it is generally not recommended to mess with CPAN modules, this is one of your options (since you are doing it locally). You may also want to read up on "Overriding Built-in Functions" in
perlsub. Again the method you choose depends on the way the current code that has been dropped in your lap was written.
You can also just profile the code using a regular profiler. Here is a thread that talks a little about profiling: Get Execution time.