Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to track the number of times a method is called [closed]

I need to count the number of times each method is called when the project is run.

Also I need to know both the production and the dev mode, whatever tools code or something it can count for me.

I use C# .NETcore vso2017 Enterprise

like image 788
TestIt Avatar asked Dec 13 '25 10:12

TestIt


1 Answers

You could use the Performance Profiler in Visual Studio (Analyze > Performance Profiler...). In Available Tools, check Performance Wizard. Start (choose Instrumentation method).

When the profiling is finished, it should show you the Summary view of the profile. Change the Current View dropdown to Functions. This should list all the functions that were hit during execution along with the number of calls (plus time spent, etc).

like image 121
Nigel Whatling Avatar answered Dec 15 '25 23:12

Nigel Whatling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!