“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

How small business shall work with major contracts. Opinion of Ruslan Kafiatullin from Neti Projects from scratch are always riskyAs a rule, implementation projects from scratch are always...
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...
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...

Subscribe for blog updates

Get updated with our blog new articles via your email!

Subscribe now