Wednesday, June 7, 2017

Profiling a process on a machine without Visual Studio

Today I needed to create a performance profile of a certain program. Usually I would just fire up Visual Studio, but VS is very large and wasn't on that computer. Fortunately, the profiler can be installed without the full IDE. The setup package can be found in this folder on the newest version of Visual Studio:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools\Setups

Copy the installer to the other computer and set it up. The tools get installed to that same path, minus the Setups part. Then run the profiler on your application from an administrative command prompt:

vsperf /launch:"C:\path\to\myapp.exe" /file:filetitle

Once the launched process exits, the profiler saves the report to filetitle.vspx. Copy that file back to a computer with Visual Studio. Open it with File | Open | File and you'll get the analysis.

No comments:

Post a Comment