MeasureIt Update: Tool for doing MicroBenchmarks for .NET

Almost a year ago now I wrote part 1 and part 2 of a MSDN article entitled 'Measure Early and Measure Often for Good Performance'.  In this article I argued that if you want to design high performance applications you need to be measuring performance early and often in the design process.   To help doing this I posted a tool call 'MeasureIt'.  It basically makes it easy to write benchmarks for .NET code.   In particular it also comes with at set of built-in benchmarks that measure the most important fundamental operations in .NET, so you can know what is expensive and what is not. 

Well, is has been a almost a year, and I have made a few bug fixes / improvements ot MeasureIt since then, so this post brings MeasureIt up to date.   It also allows me to correct a mistake I made when I posted the unoptimized version of MeasureIt for that article.  It also allows me to improve the user experience during the download. 

MeasureIt is supper easy to use in the simple case (just run it), and has good documentation (MeasureIt /usersGuide).   You are in fact only 7 clicks away from running it right now.   To do so

  1. Click on the '' link at the bottom of this article.  This brings up a download dialog box.

  2. Click on the 'Open' button.  This brings up a security dialog.

  3. You should click 'Allow' on the security dialog.  (Yes you have to trust me).  This opens the ZIP archive.

  4. Click on the 'MeasureIt' directory (alternatively you can copy it to your hard drive). 

  5. Click on the 'MeasureIt.exe' file

  6. Click on the 'Run' dialog box that comes up.

  7. You may get another security dialog.  You have to allow that. 

At this point it runs MeasureIt.  It takes a few seconds for it it run and then it displays the data on the costs of 50 or so .NET operations.   As mentioned in the article, this it really useful stuff.   MeasureIt comes with its own source code, and typeing 'MeasureIt /Edit' allows you to add more benchmarks to it if you want to measure somethign of your own.   

Happy Performance Investigating!

Comments (9)

  1. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Visual T4 Blog is a new blog focused on the T4 code generation tool that ships with VS2008. Here are the first few posts: New Blog

  2. Helper Code says:

    I've been interested in performance optimization from the first application I wrote and since than

  3. I can’t tell you how many times I’ve heard this – from PMs, dev leads, and colleagues. Other than the

  4. ToolmakerSteve says:

    Downloaded  Did /edit to extract sources. Load in Vis Studio 2010 B2, which upgraded the project (though still targeting Framework 2.0). Get 20 errors and 13 warnings. Errors are 10x "Cannot use fixed local ‘aIntPtr’ inside an anonymous method, lambda expression, or query expression", and 10x "No overload for method ‘VarargsMethod’ takes 1 arguments".

  5. Jacky says:

    Why I Cannot find The MeasureIt /usersGuide after zipping it?

  6. The users guide is emeded in the EXE itself (as well as all the source code).  You get at it by running

    MeasureIt /usersGuide.

    You can also do MeasureIt /edit, which will unpack the source code (including UsersGuide.htm) and you can view (and modify) it

  7. Winborg says:

    Very useful plugin are you going to create it for IE and Chrome

Skip to main content