Skip to content

Commit 4d11aa4

Browse files
authored
Merge pull request #5747 from MicrosoftDocs/master637333040053523091
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 1871ace + c5263b1 commit 4d11aa4

File tree

5 files changed

+17
-93
lines changed

5 files changed

+17
-93
lines changed

docs/get-started/csharp/tutorial-console-part-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.workload:
1818
---
1919
# Tutorial: Extend a simple C# console app
2020

21-
In this tutorial, you'll learn how to use Visual Studio to extend the console app you created in the first part. You'll learn some of the features in Visual Studio that help you be more productive as a developer, such as using advanced editor features, and debugging.
21+
In this tutorial, you'll learn how to use Visual Studio to extend the console app you created in the first part. You'll learn some of the features in Visual Studio that you'll need for daily development, such as managing multiple projects, and referencing third-party packages.
2222

2323
If you just completed the [first part](tutorial-console.md) of this series, you already have the Calculator console app. To skip part 1, you can start by opening the project from a GitHub repo. The C# Calculator app is in the [vs-tutorial-samples repo](https://github.com/MicrosoftDocs/vs-tutorial-samples), so you can just follow the steps in [Tutorial: Open a project from a repo](../tutorial-open-project-from-repo.md) to get started.
2424

docs/get-started/csharp/tutorial-console.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,10 @@ namespace Calculator
594594

595595
## Next steps
596596

597-
Congratulations on completing this tutorial! To learn even more, continue with the following tutorials.
597+
Continue with the second part of this tutorial:
598598

599599
> [!div class="nextstepaction"]
600-
> [Continue with more C# tutorials](/dotnet/csharp/tutorials/)
600+
> [Continue with Part 2](tutorial-console-part-2.md)
601601

602602
## See also
603603

docs/profiling/profile-apps-from-command-line.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Profiling using the Visual Studio Diagnostics CLI tools works by attaching the p
3636

3737
1. Start Notepad, and then open Task Manager to get its process ID (PID). In Task Manager, find the PID in the **Details** tab.
3838

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).
4040

41-
```<Visual Studio installation folder>\2019\Preview\Team Tools\DiagnosticsHub\Collector\```
41+
```<Visual Studio installation folder>\2019\Enterprise\Team Tools\DiagnosticsHub\Collector\```
4242

4343
1. Start *VSDiagnostics.exe* by typing the following command.
4444

@@ -49,9 +49,15 @@ Profiling using the Visual Studio Diagnostics CLI tools works by attaching the p
4949
The arguments that must be included are:
5050

5151
* \<*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.
5353
* \<*configFile*>, configuration file for the collection agent you wish to launch. For more information, see [Configuration files for agents](#config_file).
5454

55+
For example, you could use the following command for the CPUUsageBase agent by replacing the *pid* as described previously.
56+
57+
```cmd
58+
VSDiagnostics.exe start 1 /attach:<pid> /loadConfig:AgentConfigs\CPUUsageLow.json
59+
```
60+
5561
1. Resize Notepad, or type something in it in order to make sure that some interesting profiling information is collected.
5662

5763
1. Stop the collection session and send output to a file by typing the following command.
@@ -60,7 +66,9 @@ Profiling using the Visual Studio Diagnostics CLI tools works by attaching the p
6066
VSDiagnostics.exe stop <id> /output:<path to file>
6167
```
6268

63-
1. Go to the file output from the previous command, and open it in Visual Studio to examine the information collected.
69+
1. Locate the *.diagsession* file output from the previous command, and open it in Visual Studio (**File** > **Open**) to examine the information collected.
70+
71+
To analyze the results, see the documentation for the corresponding performance tool. For example, this might be the [CPU Usage](../profiling/cpu-usage.md), [.NET Object Allocation tool](../profiling/dotnet-alloc-tool.md), or the [Database](../profiling/analyze-database.md) tool.
6472

6573
## <a name="config_file"></a> Agent configuration files
6674

docs/profiling/running-profiling-tools-with-or-without-the-debugger.md

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -83,88 +83,4 @@ You can save the reports, and open them from the **Recently Opened Sessions** li
8383

8484
## Collect profiling data from the command line
8585

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:
97-
98-
```
99-
VSDiagnostics.exe start <id> /launch:<appToLaunch> /loadConfig:<configFile>
100-
```
101-
102-
You must include the following arguments:
103-
104-
- \<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.
120-
121-
```
122-
VSDiagnostics.exe start <id> /attach:<pid> /loadConfig:<configFile>
123-
```
124-
125-
You must include the following arguments:
126-
127-
- \<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:
153-
154-
- https://aka.ms/vs/diaghub/agentconfig/cpubase
155-
- https://aka.ms/vs/diaghub/agentconfig/cpuhigh
156-
- https://aka.ms/vs/diaghub/agentconfig/cpulow
157-
- https://aka.ms/vs/diaghub/agentconfig/database
158-
- https://aka.ms/vs/diaghub/agentconfig/dotnetasyncbase
159-
- https://aka.ms/vs/diaghub/agentconfig/dotnetallocbase
160-
- https://aka.ms/vs/diaghub/agentconfig/dotnetalloclow
161-
162-
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:
167-
168-
```
169-
VSDiagnostics.exe start <id> /attach:<pid> /loadAgent:<agentCLSID>;<agentName>[;<config>]
170-
```
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. For detailed instructions, see [Measure application performance from the command line](../profiling/profile-apps-from-command-line.md).

docs/test/run-a-unit-test-as-a-64-bit-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you have a 64-bit machine, you can run unit tests and capture code coverage i
2424
::: moniker-end
2525

2626
> [!TIP]
27-
> For maximum flexibility, compile your test projects with the **Any CPU** configuration. Then you can run on both 32-bit and 64-bit agents. There's no advantage to compiling test projects with the **64-bit** configuration.
27+
> For maximum flexibility, compile your test projects with the **Any CPU** configuration. Then you can run on both 32-bit and 64-bit agents. There's no advantage to compiling test projects with the **64-bit** configuration, unless you are calling code that is only supported on 64-bit.
2828
2929
2. Set the unit tests to run as a 64-bit process.
3030

0 commit comments

Comments
 (0)