You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/profiling/profile-apps-from-command-line.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,9 @@ Profiling using the Visual Studio Diagnostics CLI tools works by attaching the p
36
36
37
37
1. Start Notepad, and then open Task Manager to get its process ID (PID). In Task Manager, find the PID in the **Details** tab.
38
38
39
-
1. Open a command prompt and change to the directory with the collection agent executable, typically here.
39
+
1. Open a command prompt and change to the directory with the collection agent executable, typically here (for Visual Studio Enterprise).
40
40
41
-
```<Visual Studio installation folder>\2019\Preview\Team Tools\DiagnosticsHub\Collector\```
41
+
```<Visual Studio installation folder>\2019\Enterprise\Team Tools\DiagnosticsHub\Collector\```
42
42
43
43
1. Start *VSDiagnostics.exe* by typing the following command.
44
44
@@ -49,9 +49,15 @@ Profiling using the Visual Studio Diagnostics CLI tools works by attaching the p
49
49
The arguments that must be included are:
50
50
51
51
*\<*id*> Identifies the collection session. The ID must be a number between 1-255.
52
-
*\<*pid*>, PID of the process you wish to profile, in this case the PID you found in step 1
52
+
*\<*pid*>, PID of the process you wish to profile, in this case the PID you found in step 1.
53
53
*\<*configFile*>, configuration file for the collection agent you wish to launch. For more information, see [Configuration files for agents](#config_file).
54
54
55
+
For example, you could use the following command for the CPUUsageBase agent by replacing the *pid* as described previously.
Copy file name to clipboardExpand all lines: docs/profiling/running-profiling-tools-with-or-without-the-debugger.md
+1-85Lines changed: 1 addition & 85 deletions
Original file line number
Diff line number
Diff line change
@@ -83,88 +83,4 @@ You can save the reports, and open them from the **Recently Opened Sessions** li
83
83
84
84
## Collect profiling data from the command line
85
85
86
-
To measure performance data from the command line, you can use VSDiagnostics.exe, which is included with either Visual Studio or the Remote Tools. This is useful for capturing performance traces on systems where Visual Studio isn't installed, or for scripting the collection of performance traces. When you use VSDiagnostics.exe, you begin a diagnostic session that captures and stores profiling data until the tool is stopped. At that point, that data is exported into a .diagsession file, and you can open this file in Visual Studio to analyze results.
87
-
88
-
### Launch an application
89
-
90
-
1. Open a command prompt, and change to the directory with VSDiagnostics.exe:
91
-
92
-
```
93
-
<Visual Studio Install Folder>\Team Tools\DiagnosticsHub\Collector\
94
-
```
95
-
96
-
2. Start VSDiagnostics.exe with the following command:
-\<id\>: Identifies the collection session. The ID must be a number between 1-255.
105
-
-\<appToLaunch\>: The executable file to launch and profile.
106
-
-\<configFile\>: The configuration file for the collection agent you want to launch.
107
-
108
-
3. To stop collection and view your results, follow the steps in the "Stop collection" section later in this article.
109
-
110
-
### Attach to an existing application
111
-
112
-
1. Open an application, such as Notepad, and then open **Task Manager** to get its process ID (PID). In Task Manager, find the PID in the **Details** tab.
113
-
2. Open a command prompt, and change to the directory with the collection agent executable. Typically, it's here:
114
-
115
-
```
116
-
<Visual Studio installation folder>\2019\Preview\Team Tools\DiagnosticsHub\Collector\
117
-
```
118
-
119
-
3. Start the VSDiagnostics.exe file by typing the following command.
-\<id\>: Identifies the collection session. The ID must be a number between 1-255.
128
-
-\<pid\>: The PID of the process you want to profile, which in this case is the PID you found in step 1.
129
-
-\<configFile\>: The configuration file for the collection agent you want to launch. For more information, see [Configuration files for agents](../profiling/profile-apps-from-command-line.md).
130
-
131
-
4. To stop collection and view your results, follow the steps in the next section.
132
-
133
-
### Stop collection
134
-
135
-
1. Stop the collection session, and send output to a file, by typing the following command.
136
-
137
-
```
138
-
VSDiagnostics.exe stop <id> /output:<path to file>
139
-
```
140
-
141
-
2. Go to the file output from the previous command, and open it in Visual Studio to examine the information collected.
142
-
143
-
## Agent configuration files
144
-
145
-
Collection agents are interchangeable components that collect different types of data, depending on what you are trying to measure.
146
-
For convenience, you can store that information in an agent configuration file. The configuration file is a .json file that contains, at minimum, the name of the .dll file and its COM CLSID. Here are the example configuration files that you can find in the following folder:
147
-
148
-
```
149
-
<Visual Studio installation folder>\Team Tools\DiagnosticsHub\Collector\AgentConfigs\
150
-
```
151
-
152
-
Please see the following links to download and view agent configuration files:
CpuUsage configurations (Base/High/Low) correspond to data collected for the [CPU Usage](../profiling/cpu-usage.md) profiling tool.
163
-
DotNetObjectAlloc configurations (Base/Low) correspond to data collected for the [.NET Object Allocation tool](../profiling/dotnet-alloc-tool.md).
164
-
165
-
Base/Low/High configurations refer to the sampling rate. For example, Low is 100 samples/second and High is 4000 samples/second.
166
-
For the VSDiagnostics.exe tool to work with a collection agent, it requires both a DLL and a COM CLSID for the appropriate agent. The agent might also have additional configuration options. If you use an agent without a configuration file, use the format in the following command:
To measure performance data from the command line, you can use VSDiagnostics.exe, which is included with either Visual Studio or the Remote Tools. This is useful for capturing performance traces on systems where Visual Studio isn't installed, or for scripting the collection of performance traces. For detailed instructions, see [Measure application performance from the command line](../profiling/profile-apps-from-command-line.md).
0 commit comments