Skip to content

Commit c69cc66

Browse files
committed
Updates
1 parent 7aed823 commit c69cc66

File tree

3 files changed

+21
-28
lines changed

3 files changed

+21
-28
lines changed

aspnetcore/blazor/performance/app-download-size.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Tips for reducing app download size in ASP.NET Core Blazor apps and
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 04/30/2025
8+
ms.date: 05/02/2025
99
uid: blazor/performance/app-download-size
1010
---
1111
# ASP.NET Core Blazor app download size performance best practices

aspnetcore/blazor/performance/webassembly-browser-developer-tools-diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about browser developer tools diagnostics in ASP.NET Core Bla
55
monikerRange: '>= aspnetcore-10.0'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 04/30/2025
8+
ms.date: 05/02/2025
99
uid: blazor/performance/webassembly-browser-developer-tools
1010
---
1111
# ASP.NET Core Blazor WebAssembly browser developer tools diagnostics

aspnetcore/blazor/performance/webassembly-event-pipe-diagnostics.md

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about Event Pipe diagnostics and how to get a Garbage Collect
55
monikerRange: '>= aspnetcore-10.0'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 04/30/2025
8+
ms.date: 05/02/2025
99
uid: blazor/performance/webassembly-event-pipe
1010
---
1111
# ASP.NET Core Blazor WebAssembly Event Pipe diagnostics
@@ -30,27 +30,38 @@ dotnet workload install wasm-tools
3030

3131
[EventPipe](/dotnet/core/diagnostics/eventpipe) is a runtime component used to collect tracing data, similar to [ETW](/windows/win32/etw/event-tracing-portal) and [perf_events](https://wikipedia.org/wiki/Perf_%28Linux%29).
3232

33-
* Manual testing
34-
* Browser developer tools: Download the `.nettrace` output file, open the file in Visual Studio, and find the expected method calls.
35-
* [`dotnet-trace`](/dotnet/core/diagnostics/dotnet-trace): Open the `.nettrace` output file in Visual Studio and find the expected method calls.
36-
* Web-based testing
37-
* Upload the file via HTTP.
38-
* Parse and validate that the trace contains the expected method calls.
33+
Collect CPU counters for 60 seconds with `collectCpuSamples(durationSeconds)`:
34+
35+
```javascript
36+
globalThis.getDotnetRuntime(0).collectCpuSamples({durationSeconds: 60});
37+
```
3938

4039
## GC (Garbage Collector) dumps
4140

42-
* Manual testing:
41+
Manual testing:
4342

4443
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected classes.
4544
* [`dotnet-gcdump` (`collect`/convert` options)](/dotnet/core/diagnostics/dotnet-gcdump): To view the captured GC dump files, see [View the GC dump captured from dotnet-gcdump](/dotnet/core/diagnostics/dotnet-gcdump#view-the-gc-dump-captured-from-dotnet-gcdump).
4645

46+
Collect a GC (Garbage Collector) dump of the live .NET process with `collectGcDump`:
47+
48+
```javascript
49+
globalThis.getDotnetRuntime(0).collectGcDump();
50+
```
51+
4752
## Counters trace
4853

4954
Manual testing:
5055

5156
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected counters.
5257
* [`dotnet-counters collect`](/dotnet/core/diagnostics/dotnet-counters): Open the `.csv`/`.json` output file in Visual Studio and find the expected counters.
5358

59+
Collect diagnostic counters for 60 seconds with `collectPerfCounters(durationSeconds)`:
60+
61+
```javascript
62+
globalThis.getDotnetRuntime(0).collectPerfCounters({durationSeconds: 60});
63+
```
64+
5465
## .NET Core Diagnostics Client Library example
5566

5667
Parse and validate NetTrace (`.nettrace`) messages using the .NET Core Diagnostics Client Library:
@@ -62,24 +73,6 @@ For more information, see the [.NET Core diagnostics documentation](/dotnet/core
6273

6374
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
6475

65-
Collect a GC (Garbage Collector) dump of the live .NET process with `collectGcDump`:
66-
67-
```javascript
68-
globalThis.getDotnetRuntime(0).collectGcDump();
69-
```
70-
71-
Collect diagnostic counters for 60 seconds with `collectPerfCounters(durationSeconds)`:
72-
73-
```javascript
74-
globalThis.getDotnetRuntime(0).collectPerfCounters({durationSeconds: 60});
75-
```
76-
77-
Collect CPU counters for 60 seconds with `collectCpuSamples(durationSeconds)`:
78-
79-
```javascript
80-
globalThis.getDotnetRuntime(0).collectCpuSamples({durationSeconds: 60});
81-
```
82-
8376
The MSBuild properties in the following table enable profiler integration.
8477

8578
Property | Default | Set value to… | Description

0 commit comments

Comments
 (0)