“Manual code profiler” is used to analyze code’s performance

Updated: 30.05.2016

AX’s Code Profiler has some well-known problems.

1. Performance problems: collecting data can last very long if the analyzed code execution take more time. If the analyzed code executes in 30 minutes, then the data collection will be processed in few hours. In sum you try to modify your code and wait another few hours to see the result.

2. Code Profiler have some bugs (in AX 3.0 for example) and shows wrong result values.

Sometimes developers use Infolog and time counters. The main goal of the “manual code profiler” is to make control points quickly and easily and see results in a short time.

You can find the ManualProfiler class and the example job in the attached project.

You have to call ManualProfiler class’s methods before and after the analyzed code parts. And after that you can get the result: system’s tick count, method’s call count and average call’s elapsed time. If the method is called several times, then all that counts will be summed up.

In case you use several classes, you can use global cache in order to get the global results of analysis.

 

Other blog posts

24.05.2018
Disclaimer
08.05.2018
We apply OKR methodology in Neti since 2014. We started from a quarterly planning, but then understood that no ambitious goals can be achieved per quarter. So we switched to semi-annual intervals....
11.04.2018
As you know, Microsoft recently has launched Dynamics 365 Business Central. And we are proud to announce we have launched intracompany training for sales and development departments:Why do we need it...

Subscribe for blog updates

Get updated with our blog new articles via your email!


Subscribe now