There is a very good feature called code profiler. The Code Profiler
measures and records the execution of each line of code, the time taken by each
line ,the Parent(caller) and the child of the each lines, all these are saved
to database for review, also it has variety of options to review the recorded
information
We can use this tool to find and remove the performance bottlenecks to
improve the performance of whole application, also its useful to understand the
flow of others code quickly
Click
Tools > Code profiler to open the Code Profiler tool.
- Navigate
to the functionality that you want to test
- To
limit the results displayed, check the Trace depth enabled check box, and
then type the number of levels that you want to be displayed in the
results.
- Click
Start.
- Use
the functionality you want to test.
- When
testing is complete, click Stop.
- The
system now saves all logged data to the database. This might take quite
some time because a database record is created for each executed line of
code.
- Write
a description of your code profile in the Summary dialog.
- Click
OK.
- The Profiler runs form opens. This enables you to view data collected by the profiler
You can control the code profiler directly from your X++
code. For this purpose there are two macros:
· #Profilebegin()
· #ProfileEnd
These two macros have to be in the same level in a method.
That's it for now...
No comments:
Post a Comment