Skip to content

Review: dotTrace 3.1

5 January 2010

When running some unit tests for the Object Mapper project, I found the test suite’s execution time had slowed down noticably. I had been spoiled at my previous employer, where I had access to ANTS Profiler. So, I set about finding a performance profiling tool.

While there are some free profilers out there, the reviews on the web led me to believe they wouldn’t be up to the task. I was drawn to dotTrace because of its ReSharper integration. I decided to give it a go with their 30-day trial.

What you will read in forums is absolutely true: ANTS provides more data, with ReSharper, dotTrace is much easier to use. And, I have learned that more data is not necessarily better.

It seemed that dotTrace could not trace the code execution once it had been loaded into ReSharper’s test runner thread, so I had to write a quick console app to exercise the code I wanted to check.
dotTrace was able to pinpoint the area of code that plagued me, where I was doing some repetitive MethodInfo lookups. Some caching brought the performance back in line with what it had been.

During this tweaking process, I found dotTrace’s capability to compare test runs to be invaluable! I was able to see in percentage terms how much things improved with the caching. I also removed the caching and saw the performance degrade as expected, so I could be sure it wasn’t coincidence. And, I am happy to report that the Console.WriteLine statements in the console app were the most time-consuming piece of the process, so my engine ought be able to withstand the load I understand it will receive in production.

I strongly considering buying dotTrace when my trial expires. It’s a good tool to have in the toolbelt.

3 Comments leave one →
  1. Oleg Stepanov permalink
    13 January 2010 4:25 am


    Thanks for sharing your experience with dotTrace. I just didn’t quite catch the limitation you meant in “dotTrace could not trace the code execution once it had been loaded into ReSharper’s test runner thread”. Could you please elaborate more on that?

    Thanks, Oleg

    • neontapir permalink
      14 January 2010 9:31 am

      Sure, Oleg! Thanks for the inquiry.

      When I run my MbUnit unit tests through the ReSharper 4.5 test runner and profile them with dotTrace, it appears that the tests are executed on a separate thread, and I can’t seem to find a way to get detailed results on that thread, even if I select All Threads. dotTrace reports down to the JetBrains.ReSharper.TaskRunnerFramework.TaskExecutor.Run(String, String, Boolean, ProxyFactoryDelegate) method, which has 0 calls and took 100% of the profiling run time (0.085 sec for 12 tests, in this case). Also, the source view pane shows it can’t find Gallio’s TakeRunnerFramework\src\TaskExecutor.cs file. Any ideas?

      • Oleg Stepanov permalink
        19 January 2010 4:09 am

        We are investigating the issue. ReSharper uses Gallio to run MbUnit tests so probably the issue is with the way they split the job between processes.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: