I am working on one web API and it's working very slow taking approx 20 Sec. for 500 rows. We are not allowed to use any tool. Is there any way to calculate flaws using c# code. By creating a tool or adding some line of code before and after each methods. I mainly want to check if there is managed or native memory leak. Is there any way to calculate Private bytes and Bytes in all Heaps? I'm able to calculate time method is taking by adding debug point in code and using VS Diagnostic tool. Thanks for your help in advance.