I have application with more than 500 classes under on each DLL. By this way application includes 7 to 10 DLLs.
For optimization purpose, I want to know the time taken for each method and sub-methods for a particular process.
To achieve this, I add 2 lines of code at beginning and end of each method, which add the method name and time of execution to log file. Once I found the long running method and optimize it, remove those lines.
Is there any automation available for this process? Like by enabling any Boolean settings framework will write log file with method name and execution time of the same. :)
(or) Is there any other way easy way to achieve the above? :(