I need to create a class to intercept the methods of a certain class in order to monitor the execution time, to find out where the bottleneck of my transactions is.
I need to create a class to intercept the methods of a certain class in order to monitor the execution time, to find out where the bottleneck of my transactions is.
What you want is a profile .
You will not be able to do something directly in the code that works properly and does not bring other problems.
Some examples:
Each has its own specific advantage and utility. There are several other paid options and now that you know what you're about you can search for yourself.