“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

14.11.2017
Why outsourcing company is more effective than In-house IT-specialists There are situations when in-house specialists spend most of their time awaiting requests or they cannot get their work...
26.09.2017
Microsoft Dynamics AX program decisions are constantly improving. At first, innovations come to European companies, and only after that to Russian enterprises.We aspire to be one step ahead in this...
28.08.2017
Notes of the summit and of Dynamics market in Russia. Neti has been specializing in AX development since 2003. Our sphere of interest is the cutting-edge MS Dynamics technology. We find, study...

Subscribe for blog updates

Get updated with our blog new articles via your email!


Subscribe now