Hello Nimmy
In Visual Studio, there are some profiling tools for you to test the performance of your programs/codes. You can refer to this document First look at profiling tools, for example, select Debug > Performance Profiler… > choose one or more tools to run such as CPU Usage, Database and Memory Usage > then start the diagnostic session and collect the profiling data. After that, you can check the functions which are invoked and used by the program and find the information of CPU usage, Database, Memory Usage and so on.
If you’d like to analyze the bottleneck of your project by using load test, you can refer to this document Edit load patterns to model virtual user activities, and try to set more user counts (load patterns: constant and step). After that, follow steps below to analyze load test results using the Load Test Analyzer.
- Monitor a load test when it is running.
- Analyze a load test after it has completed.
- View results from a previous load test.
By the way, If you’d like to test and know how long do every functions and code lines run, you can try to use Stopwatch Class(.NET).
Best Regards,
Tianyu