Profiling from the Command Line using dotTrace Performance
Did you know that you can run dotTrace Performance from the command line? Why would you want to run it from the command line? Maybe you want to share the same profiling configuration across the team? Maybe you want to run it as part of your build process? Maybe you want to run dotTrace as part of a larger testing process with other command line tools?
There are lots of reasons why you might want to run dotTrace Performance from the command line. Let’s look at how we can do exactly this.
Profiling from the command line is divided into two steps. First we create a configuration file that specifies the options we want to use. Next we launch dotTrace Performance using that profiling configuration file.
Creating a profiling configuration file
- To create a profiling configuration file, open a command prompt and change to the dotTrace installation directory:
cd c:Program Files (x86)JetBrainsdotTracev5.2Bin
- Run Configuration2Xml.exe with the full path of the configuration file that you want to create:
N.B. Running Configuration2Xml.exe with an existing profiling configuration file will edit the file rather than overwriting it.
- The Profile Application dialog will open. Select the type of application that you want to profile and click OK:
- The Profiler Configuration dialog will open. Select the profiler options that you want to use and click Save:
- Configuration2Xml.exe will create the specified profiling configuration XML file.
- To start profiling, run dotTraceProfiler.exe with the profiling configuration file:
- Once the application exits, a DTP file will be written in the current working directory, which can be opened and analyzed in dotTrace Performance.
For additional control of profiling, dotTraceProfiler.exe has a number of optional command line arguments:
- /showcontroller: Open the profile controller dialog where you can start/stop profiling, capture snapshots, and detach/kill the profiled process.
- /output=<OutputPath>: Specify the file name and/or directory where snapshots should be saved.
- /rawformat: Use an uncompressed snapshot format for faster processing and saving at the expense of increased file size.
dotTrace Performance can easily be orchestrated from the command line and integrated into your development process. Profile with pleasure!
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…