Performance Profiling in Rider 2018.3. What’s New?

If you’re an active Rider 2018.3 user or just follow our blog, you probably know that Rider just got an integrated performance profiler based on JetBrains dotTrace. Though we’ve already reviewed the profiler features on the EAP stage, the release version brings some important changes, especially concerning profiling session configuration. Read this post to learn more about the changes.

Supported OSs and frameworks

Just to reiterate: in Rider 2018.3, the profiler supports only Windows + .NET Framework / .NET Core. We’re on the finish line with adding support for Mono and Mono Unity (as well as support for Linux and MacOS), but the feature still requires some polishing. It is highly likely that you will see it in early 2019.1 EAP builds.

What can you profile in Rider?

A quick reminder of what can be a profiling target:

  • NET / .NET Core standalone applications
  • ASP.NET / ASP.NET Core web applications (IIS Express only)
  • Arbitrary .NET / .NET Core processes
  • NUnit / xUnit / MSTest unit tests

In this post, we’ll take a quick look at how you can profile apps in Rider. For details on how to profile tests or arbitrary .NET processes, please refer to the Rider documentation. So, what has changed exactly in the release version of Rider 2018.3?

Configuring and starting a profiling session

Profiling configuration in Rider
Session configuration has been affected the most as it is no longer part of run configuration:

  • Profiling session configuration is a separate entity that is selected/edited right from the toolbar.
  • Profiling target is always an executable specified in the currently selected run configuration. For example, if you profile a web app on IIS Express, the profiling target is iisexpress.exe that runs this web app. Currently, you can profile the following run configuration types:
  • To start a session, simply select a profiling configuration and click the same control on the toolbar.

Profiling session configuration in Rider

Getting snapshots

This part hasn’t changed much since the EAP stage. It’s quite straightforward: after the profiling session starts, do what you need to do in your application, and then click Get Snapshot.
Get performance snapshot in Rider

Analyzing snapshots

Once you have a performance snapshot, use the Top Methods view and the Call Tree view to determine the cause of a performance bottleneck. The analysis workflow has changed somewhat after the EAP.

Combined Call Tree and Top Methods

First of all, the Top Methods and Call Tree views are now connected with each other. If Follow selection icon Follow the selection is turned on, Top Methods shows methods only for the subtree that is currently selected in Call Tree.
Analyzing profiling snapshots in Rider

Filters for Timeline snapshots

The second improvement is related to Timeline profiling. We’ve added more filters comparing to the EAP. Now, you can use four basic filters:

  • by thread,
  • by thread state,
  • by method, and
  • by subsystem.

Analyzing profiling snapshots in Rider. Using filters

Improved navigation

The navigation capabilities are also improved. You can navigate:

  • from a snapshot to code,
  • from code to a snapshot,
  • from Search Everywhere to a snapshot.

Analyzing profiling snapshots in Rider. Navigation

As always, we invite you to download the latest Rider to try its new profiling features in practice.

This entry was posted in How-To's and tagged , , . Bookmark the permalink.

18 Responses to Performance Profiling in Rider 2018.3. What’s New?

  1. Pingback: Dew Drop - January 17, 2019 (#2880) - Morning Dew

  2. Any estimates on when we can expect to see this feature on Mac and Linux?

  3. Vasily Kirichenko says:

    Line-by-line mode should result with call number on the gutter next to every line.

    • Alexey Totin says:

      Hi Vasily,
      yes, showing performance data right in the editor is one of the features we’re currently working on, so, stay tuned 😉

  4. Sealin says:

    Is there a plan to implement the winform designer? C# is really needs this feature.

  5. Pingback: Dew Drop - January 18, 2019 (#2881) - Morning Dew

  6. Abrari says:

    I cannot find the profiling toolbar on my installation (Rider 2018.3.1 on Windows 10).

    How can I show the toolbar? Or does the profiling action accessible from the main menu?

    • Vasily Kirichenko says:

      The commands are under “Run” main menu.

    • Alexey Totin says:

      Hi,
      using the profiler requires a license for either the Rider + ReSharper Ultimate or the All Products Pack. Once you have it, the bundled dotTrace plugin is installed by default, otherwise, not. Maybe this is the problem?

      • abrari says:

        Thanks for clarifying. I only have Rider license, so that is the problem (this article didn’t mention about license requirement for the profiler).

  7. Felipe says:

    Any updates on macOS ?

Leave a Reply to abrari Cancel reply

Your email address will not be published. Required fields are marked *