Skip to content

Commit 562bb49

Browse files
docs and images
1 parent 873af02 commit 562bb49

File tree

8 files changed

+87
-0
lines changed

8 files changed

+87
-0
lines changed

docs/profiling/analyze-async.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "Analyze Performance of .NET Asynchronous Code | Microsoft Docs"
3+
ms.date: "5/5/2020"
4+
ms.topic: "conceptual"
5+
helpviewer_keywords:
6+
- "asynchronous, async, profiling"
7+
author: "Esteban Herrera"
8+
ms.author: "esherrer"
9+
manager: AndSter
10+
ms.workload:
11+
- "multiple"
12+
---
13+
14+
# Analyze Performance of .NET Asynchronous Code
15+
16+
The .NET Async Tool allows you to analyze the performance of asynchronous code in your application.
17+
18+
>[!NOTE]
19+
> The .NET Async tool requires Visual Studio 2019 version <= 16.7
20+
and a .NET project using async/await.
21+
22+
## Setup
23+
24+
1. Open the Performance Profiler **(Alt + F2)** in Visual Studio.
25+
2. Select the **.NET Async** checkbox.
26+
27+
![.NET Async Tool Selected](./media/async_tool_selected.png ".NET Async Tool Selected")
28+
29+
3. Click the **Start** button to run the tool.
30+
31+
4. Once the tool starts running, go through the desired scenario in your app, then press **Stop Collection** or close your app to see your data.
32+
33+
5. After collection is stopped, you'll see a table of the activities that happened during your profiling session.
34+
35+
![.NET Async Tool Stopped](./media/async_tool_opened.png ".NET Async Tool Stopped")
36+
37+
The queries will be organized chronologically, but can be sorted by any of the columns (more columns can be enabled by right clicking the column titles), clicking the Duration column will order the queries from longest lasting to shortest, and once you’ve found a query you’d like to investigate, you can right click the query and select “Go to Source File” to see what code is responsible for that query.
38+
39+
![Allocation](./media/async_tool_gotosource.png "Allocation")
40+
41+
Selecting a time range on graph will also filter the query table to only queries that occcured during that time range. This can be especially useful when running this alongside the [CPU Usage tool](https://docs.microsoft.com/en-us/visualstudio/profiling/cpu-usage?view=vs-2019).
42+
43+
task in, task, incomplete

docs/profiling/analyze-database.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Analyze Database usage for .NET Core projects | Microsoft Docs"
3+
ms.date: "5/5/2020"
4+
ms.topic: "conceptual"
5+
helpviewer_keywords:
6+
- "database, profiling"
7+
author: "Esteban Herrera"
8+
ms.author: "esherrer"
9+
manager: AndSter
10+
ms.workload:
11+
- "multiple"
12+
---
13+
# Analyze database performance using the Database tool
14+
15+
The Database Tool allows you to record the database queries that your application makes during a given diagnostic session. You can then analyze information about individual queries in order to find places where your app's performance can be improved.
16+
17+
>[!NOTE]
18+
> The database tool requires Visual Studio 2019 version <= 16.3
19+
and a .NET Core project on Windows using either [ADO.NET]( https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ado-net-overview) or [Entity Framework Core](https://docs.microsoft.com/en-us/ef/core/).
20+
21+
## Setup
22+
23+
1. Open the Performance Profiler **(Alt + F2)** in Visual Studio.
24+
2. Select the **Database** checkbox.
25+
26+
![Database Tool Selected](./media/db_launch.png "Database Tool Selected")
27+
>[!NOTE]
28+
>If the tool is not available to click, uncheck every other tool as some tools need to run by themselves. To learn more about running tools together, see "Running tools from CLI"
29+
If the tool still isn't available, please check that your project meets the requirements above.
30+
Make sure your Project is in Release mode in order to capture the most accurate data.
31+
32+
3. Click the **Start** button to run the tool.
33+
34+
4. Once the tool starts running, go through the desired scenario in your app, then press **Stop Collection** or close your app to see your data.
35+
36+
5. After collection is stopped, you'll see a table of the queries that happened during your profiling session.
37+
38+
![Database Tool Stopped](./media/db_after.png "Database Tool Stopped")
39+
40+
The queries will be organized chronologically, but can be sorted by any of the columns (more columns can be enabled by right clicking the column titles), clicking the Duration column will order the queries from longest lasting to shortest, and once you’ve found a query you’d like to investigate, you can right click the query and select “Go to Source File” to see what code is responsible for that query.
41+
42+
![Allocation](./media/db_gotosource.png "Allocation")
43+
44+
Selecting a time range on graph will also filter the query table to only queries that occcured during that time range. This can be especially useful when running this alongside the [CPU Usage tool](https://docs.microsoft.com/en-us/visualstudio/profiling/cpu-usage?view=vs-2019).
33.6 KB
Loading
33.8 KB
Loading
24.5 KB
Loading

docs/profiling/media/db_after.PNG

109 KB
Loading
54.7 KB
Loading

docs/profiling/media/db_launch.PNG

37.1 KB
Loading

0 commit comments

Comments
 (0)