Want to locate the bottlenecks of your app right when it suffers them?
MicroProfiler offers unique ability to perform analysis and deliver it in real-time. You will not have to endlessly re-run your application to gather statistics for use cases your are interested in - you will simply see performance profile as you go. Like in the video below:
Wish to keep it useful while profiling?
MicroProfiler grounds on the idea that the application being profiled must remain usable, that is its performance must not degrade much. Comparison is worth million words:
Prefer Swiss Army knives over machine guns?
MicroProfiler comes with installer that is smaller than 1MB, but is packed with tools you need to go:
- Call tracer/analyzer - attaches to the process being profiled;
- Frontend UI - displays overall function statistics with ability to sort and drill down to parent/children calls right in the runtime;
- VisualStudio add-in that allows you to switch profiling support for a project in just a single click.
MicroProfiler will not clog your hard drive with unnecessary raw data, while other profilers may store tens of gigabytes of garbage.
It has no dependencies, therefore, you can profile on a clean machine - just the symbol files (.pdb) for the binary images being profiled are required.
Good news for folks maintaining legacy software: MicroProfiler runs on Microsoft Windows XP!
Trust in OpenSource?
MicroProfiler comes with no spyware/malware. You are free to checkout the latest sources and build it yourself. You will only have to have MSVC 9.0+, Visual Studio SDK and WIX installed on your machine. The sourcecode is here:ÃÂ https://github.com/tyoma/micro-profiler
VisualStudio integration makes it pretty simple to start using MicroProfiler. Just follow these steps:
- Right-click the project your want to profile in the solution tree and check 'Enable Profiling'. Please note, that this will force the environment to rebuild your project;
- Build the project;
- Run the project;
- Profiler frontend will show-up automatically.
You may want to set the scope you wish to profile. In order to do this uncheck the 'Enable Profiling' menu item and add manually a pair of command line options to C/C++ compiler /GH /Gh for .cpp files of interest.
To profile a static library you may follow the similar steps: enable and then disable profiling on the image (dll/exe) project containing the library and manually add /GH /Gh for the library of interest.
To remove the instrumentation and profiling support click 'Remove Profiling Support' in the context menu for the project.
Windows Services Profiling
In order to profile Windows Service or other application running with credentials different than interactive user you may need to manually setup MicroProfiler. Follow these steps to do so:
- In Component Services console (%WINDIR%\SysWOW64\comexp.msc for 32-bit version on 64-bit Windows) find the profiler's frontend (named "MicroProfiler Frontend Application") in DCOM Config;
- In the tab 'Identitiy' select 'The Interactive User' to allow frontend to interact with desktop;
- In the tab 'Security' for 'launch and activation' use 'customize' and add your domain user with options 'local launch' + 'local activation' allowed for this user;
- In the same tab ('Security') for 'access' add that user with access allowance.
- Visual Studio 2019 Preview supported;
- Sporadic crashes on an attempt to load missing symbols fixed;
- Symbols are loaded on application exit and pdb(s) are released. This may lead to temporary Visual Studio irresponsiveness - be aware. This will be fixed, once asynchronous symbol loading is implemented.
- It is now possible to navigate to the function directly from the main statistics list - just double click on a function!
- x64 profiling crash fixed - in some cases penter/pexit are inserted at improper location by the MSVC compiler - this is now mitigated by preserving processor flags. A corresponding ticket was opened with Microsoft;
- A bug related to frontend not appearing when profiling an application with manifest redirecting COM/OLE fixed;
- (standalone versions) Frontend is now intelligently created - first the collector tries to bring up VS integration frontend, then, if failed, standalone one;
- Integration files (micro-profiler.initializer.cpp/micro-profiler_*.lib) are added using environment variable, thus eliminating necessity of removing old integration files on vsix package update.
- In order to visualize the proportion of time/calls of the functions profiled piecharts were added;
- Some minor changes include infrastructure rework to become less platform-dependent to clear way for Linux/GCC porting;
- An error fixed caused MicroProfiler not being included into search paths.
- MicroProfiler statistics is now displayed in a standard Visual Studio tool window (displayed as tabbed document);
- Icons added to buttons/menus (appear only in MSVC 2012+);
- Some performance improvement in statistics display.
- You now can easily Open/Save statistics gathered via MicroProfiler -> Open/Save menu integrated into Visual Studio!
- It became possible to switch between windows and close all of them with that new menu.
- VS 2017 (15.6+) integration fixed.
- Integration with Visual Studio improved significantly: problems with Enable/Disable profiling context menu and many others - fixed;
- Solved problems with "iterator debugging" (if an application changed it in precompiled header).
- MicroProfiler is now compatible with Visual Studio versions 2012 to 2017 and is available for download and install directly from Extensions and Updates dialog.
- Profiler UI may now be closed at any time, even if the profiled application is hung.
- Visual Studio 2015 integration fixed.
- VisualStudio Integration redone: MicroProfiler is now a VSPackage. This made it possible to integrate with VisualStudio 2013 and 2014;
- Menu items visibility changed: now there is only 'Enable Profiling' menu item is visible for a non-profiled project;
- The bug that prevented MicroProfiler window from popping up (after closing it, while minimized) is now fixed;
- One may want to remove ghost menu items from previous versions. This can be done by issuing a command for a corresponding development environment: devenv /ResetAddin MicroProfiler.Addin.MicroProfiler
- VisualStudio Integration is now working for all versions, except for the VS 12.0+ (2013+).
- The installer is no longer silent, it displays License Agreement and allows a user to choose the install location.