Hi all,

Below is a detailed post from one of the article listed in Microsoft Team blog about
"Introducing the Microsoft Dynamics NAV Application Pro filer".

With the tool, we can monitor how your application code performs at real time?

You can also consider it as advanced version of old Client Monitor.

Let's see how to install and configure the tool and use this tool to enable C/AL code tracing and determine application performance during code execution.

Download =

1. Download the Dynamics NAV Application Profiler From CodPlex



* Always Download the Latest Version.


2. Extract the zip file. Below are the content of zip File.



1. EtwPerformanceProfiler.dll
2. Microsoft.Diagnostics.Tracing.TraceEvent.dll
3. PAG50000 & TAB50000 (Navision Objects Related to Application Profiler).

3. If your system have security settings for downloaded files from internet, then you need to unlock the DLL File as shown below.

a) Go to Properties of both the DLL's and Under General Tab, Click Unblock as shown below.



** Step 3 is Important otherwise it will give an error message during execution from NAV.

4. If Required Renumber the Page & Table in the text File as shown below.
** I Have Re-numbered Objects to 60000.



INSTALL & CONFIGURE =

5. Now we need to register Addin in Service Tier and in Role Tailored Client.

6. Copy the Extracted folder to Service Tier and Client Tier.

   ** In the Single Machine & Default Installation paths are -
   ** Service -C:\Program Files\Microsoft Dynamics NAV\71\Service\Add-ins
   ** Client   - C:\Program Files (x86)\Microsoft Dynamics NAV\71\RoleTailored Client\Add-ins



7. Import the Page and Table in the Navision Database using NAV Developer Environment.



8. Complie the Table and Page, In My Case they are placed at ID 60000.
* You can also Filter Objects using Version Tag "Performance Profiler".



9. To enable we need to Enable Full C/AL Function Tracking at Serivce Tier as Shown Below.



Restart the Service Tier after above changes.

USAGE (A Sample Example) = 

10 . Run the Page Performance Profiler as shown below.



Let's see what Page Have -

a) Configuration Panel - 
   * Target Session ID - IS the ID of the session which you want to Profile.
   * Threshold - Time in Millisecond To Lock the Event by Tool. If any Step in the Running Process Take more time then threshold value, it will be Locked as shown in Window Below.

b) Actions -
   * Start - To Start the Tool. (After this we run the process).
   * Stop  - To Stop the Tool & See Results. (After the Process is completed).

11. Let's Start the Tool and Post a Sales Order with a Th resold of 20 Ms.


12. Now Let's stop the Performance Profiler and see the results.



As we can see that during Posting of a Sales Order, the maximum time taken is via Codeunit 81.

This was just a sample example, you can use the tool for many other activities which may take time in case the system is behaving Slow.

Hope you find post usefull.

Thanks & Regards,
Saurav Dhyani
saurav-nav.blogspot.com