Monday, March 26, 2007

Memory Profiler: Generate stat file for .NETCF 1.0 application

Remote performance monitor is available with .NETCF 2.0 to monitor the performance of application developed on the .NETCF 2.0, we can also monitor the performance of application developed on .NETCF 1.0, but it won't be real time, here a stat file will be generated for the application.

Steps to generate stat file

  • Download attached zip file.
  • Open the PMonTest solution in .Net 2005
  • Run the project, Select Pocket PC 2003 Second Edition Emulator to deploy the PMon Test application.
  • Next task is to edit the Registry. To generate the .stat file for the applications,
  • Key named as PerfMonitor need to add under
  • HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETCompactFramework\\
  • Under this key one sub key named as Counters need to be added & set its value = 1
  • Set Registry button will do the step no 3 & 4.
  • First task is to read the above subkey, to do so press Read Registry button.If the subkey is missing it will show “NullReferenceException” otherwise it will show “Performance Counter On/Off” as per the value of the Counters subkey.
  • If Counters subkey is missing or its value is “0”, Press Set Regstry button , it will set the Counters value equal to “1”.
  • Press Exit Button to close the application.* don’t press the x button of the form; it will not close the application. To generate the .stat file application needs to be closed.
  • Now open any application for which you want to generate the stat file or you can open the same PMonTest application. Its path is \PMonTest .Open the PMonTest.exe. & press either Read Registry or Show Date button.
  • Close the application by pressing the Exit Button
  • Now go to root of your device, it will have stat file for your application, so if your application name is TestApp, the stat files name would be TestApp.stat.
  • Import the stat file on your computer using .Windows CE Remote file viewer.
  • Open this file in NetCFRPM.exe, the file is located in “C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\bin” folder.

No comments:

Post a Comment