MaciekLesiczka / netric

netric core sources
Apache License 2.0
13 stars 2 forks source link

netric

Build status

Web-based tool for profiling ASP.NET applications. Aim of this project is to create lightweight profiling/monitoring tool with minimal overhead.

Why netric

How to profile ASP.NET application on IIS in 3 steps

Prerequisites:

  1. __Download, unzip the release and install Netric_x86/x64.msi__. Choose x86 if you have 32-bit system or if application pool of profiled site has "Enable 32-bit applications" flag set to true.
  2. Choose the site to profile

    1. Go to downloaded release folder and run

      apman -i "my site"

      which will enable profiling to site named my site . To make sure you use proper site name, go to IIS Manager (inetmgr) and check site names in the "Sites" node

    2. Choose assemblies to instrument. Instrumenting main assemblies of an application is a good place to start (and in the most cases just enough). So for instance, if your application consists of assemblies named like Company.App.Web.dll, Company.App.Domain.dll, Company.App.Infrastructure.dll etc. you may just point all of them like below

      apman -asm Company.App*

      For more information and examples who to choose instrumented assemblies you can type

      apman -?
    3. Reset IIS to apply new configuration
  3. Start netric.exe. Now the profiler is ready. When you start navigating through the site, netric will start collecting metrics and will be saving visualizations in flames subfolder.

How does it work

Main task for the tool is to gather method execution times from profiled ASP.NET apps and generate Flame Graph for every request. Methods are instrumented on runtime via ICorProfiler API. All metrics are sent through custom ETWs to the separate process which generates SVG charts and stores them on file system.

How to build it

Run following command in root directory:

build.bat

Donations

Donations are greatly appreciated!

Donate