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
@@ -47,21 +47,25 @@ Property | Default | Set value to… | Description
47
47
`<WasmNativeDebugSymbols>` | `true` | `true` | Controls building with native debug symbols.
48
48
`<WasmBuildNative>` | `false` | `true` | Controls building the native executable.
49
49
50
-
Enabling profilers has negative size and performance impact, so don't publish an app for production with profilers enabled. In the following example, a condition is set on a property group section that only enables profiling when the app is built with `/p:ProfilingEnabled=true` (.NET CLI) or `<ProfilingEnabled>true</ProfilingEnabled>` in a Visual Studio publish profile.
50
+
Enabling profilers has negative size and performance impact, so don't publish an app for production with profilers enabled. In the following example, a condition is set on a property group section that only enables profiling when the app is built with `/p:BlazorSampleProfilingEnabled=true` (.NET CLI) or `<BlazorSampleProfilingEnabled>true</BlazorSampleProfilingEnabled>` in a Visual Studio publish profile, where "`BlazorSampleProfilingEnabled`" is a custom symbol name that you choose and doesn't conflict with other symbol names.
Alternatively, enable features when the app is built with the .NET CLI. The following options passed to the `dotnet build` command mirror the preceding MS Build property configuration:
Setting WebAssembly profilers with `<WasmProfilers>browser;</WasmProfilers>` doesn't require AOT (`<RunAOTCompilation>`/`<RunAOTCompilationAfterBuild>` set to `false` or removed from the preceding properity group).
66
70
67
71
The browser developer tools profiler can be used with AOT (`<RunAOTCompilation>`/`<RunAOTCompilationAfterBuild>` set to `true`) and without WebAssembly profilers (`<WasmProfilers>browser;</WasmProfilers>` removed from the preceding property group).
Copy file name to clipboardExpand all lines: aspnetcore/blazor/performance/event-pipe-profiling.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
1
---
2
-
title: ASP.NET Core Blazor WebAssembly Event Pipe performance profiling and diagnostic counters
2
+
title: ASP.NET Core Blazor WebAssembly Event Pipe diagnostic profiling
3
3
author: guardrex
4
-
description: Learn about Event Pipe performance profilingand diagnostic counters in ASP.NET Core Blazor WebAssembly apps.
4
+
description: Learn about Event Pipe diagnostic profiling, counters, and how to get a Garbage Collector heap dump in ASP.NET Core Blazor WebAssembly apps.
5
5
monikerRange: '>= aspnetcore-10.0'
6
6
ms.author: riande
7
7
ms.custom: mvc
8
-
ms.date: 04/29/2025
9
-
uid: blazor/performance/event-pipe-profiling
8
+
ms.date: 04/30/2025
9
+
uid: blazor/performance/event-pipe
10
10
---
11
-
# ASP.NET Core Blazor WebAssembly Event Pipe performance profiling and diagnostic counters
11
+
# ASP.NET Core Blazor WebAssembly Event Pipe diagnostic profiling
12
12
13
13
<!-- UPDATE 10.0 - Activate ...
14
14
15
15
[!INCLUDE[](~/includes/not-latest-version.md)]
16
16
17
17
-->
18
18
19
-
This article describes Event Pipe performance profiling toolsand diagnostic counters for Blazor WebAssembly apps.
19
+
This article describes Event Pipe diagnostic profiling tools, counters, and how to get a Garbage Collector heap dump in Blazor WebAssembly apps.
@@ -74,38 +74,44 @@ For more information, see the [.NET Core diagnostics documentation](/dotnet/core
74
74
The following example:
75
75
76
76
* Collects a GC (Garbage Collector) dump of the live .NET process.
77
-
* Collects performance counters for 60 seconds.
77
+
* Collects diagnostic counters for 60 seconds.
78
78
* Collects CPU counters for 60 seconds.
79
79
80
80
The MSBuild properties in the following table enable profiler integration.
81
81
82
82
Property | Default | Set value to… | Description
83
83
--- | :---: | :---: | ---
84
84
`<WasmPerfTracing>` | `false` | `true` | Controls diagnostic server tracing.
85
-
`<WasmPerfInstrumentation>` | `false` | `true` | Controls CPU sampling instrumentation for diagnostic server. Not necessary for memory dump or counters. **Makes the app execute slower. Only set this to `true` for performance profiling.
85
+
`<WasmPerfInstrumentation>` | `false` | `true` | Controls CPU sampling instrumentation for diagnostic server. Not necessary for memory dump or counters. **Makes the app execute slower. Only set this to `true` for performance profiling.**
86
86
`<MetricsSupport>` | `false` | `true` | Controls `System.Diagnostics.Metrics` support. For more information, see the [`System.Diagnostics.Metrics` namespace](/dotnet/api/system.diagnostics.metrics).
87
87
`<EventSourceSupport>` | `false`| `true` | Controls `EventPipe` support. For more information, see [Diagnostics and instrumentation: Observability and telemetry](/dotnet/core/deploying/native-aot/diagnostics#observability-and-telemetry).
88
88
89
-
Enabling profilers has negative size and performance impact, so don't publish an app for production with profilers enabled. In the following example, a condition is set on a property group section that only enables profiling when the app is built with `/p:ProfilingEnabled=true` (.NET CLI) or `<ProfilingEnabled>true</ProfilingEnabled>` in a Visual Studio publish profile.
89
+
Enabling profilers has negative size and performance impact, so don't publish an app for production with profilers enabled. In the following example, a condition is set on a property group section that only enables profiling when the app is built with `/p:BlazorSampleProfilingEnabled=true` (.NET CLI) or `<BlazorSampleProfilingEnabled>true</BlazorSampleProfilingEnabled>` in a Visual Studio publish profile, where "`BlazorSampleProfilingEnabled`" is a custom symbol name that you choose and doesn't conflict with other symbol names.
Alternatively, enable features when the app is built with the .NET CLI. The following options passed to the `dotnet build` command mirror the preceding MS Build property configuration:
The [`Timing-Allow-Origin` HTTP header](https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Timing-Allow-Origin) allows for more precise time measurements.
103
109
104
110
Browser developer tools console calls in the following example that trigger profiling:
105
111
106
112
*`collectGcDump`: Collect a GC (Garbage Collector) dump.
107
-
*`collectPerfCounters(durationSeconds)`: Collect general performance counters.
108
-
*`collectCpuSamples(durationSeconds)`: Collect CPU performance counters.
113
+
*`collectPerfCounters(durationSeconds)`: Collect general diagnostic counters.
114
+
*`collectCpuSamples(durationSeconds)`: Collect CPU diagnostic counters.
Copy file name to clipboardExpand all lines: aspnetcore/performance/diagnostic-tools.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ By [Mike Rousos](https://github.com/mjrousos)
13
13
14
14
This article lists tools for diagnosing performance issues in ASP.NET Core.
15
15
16
-
For information on Blazor WebAssembly performance diagnostic tools and counters, see <xref:blazor/performance/developer-tools-profiling> and <xref:blazor/performance/event-pipe-profiling>.
16
+
For information on Blazor WebAssembly performance diagnostic tools and counters, see <xref:blazor/performance/browser-developer-tools> and <xref:blazor/performance/event-pipe>.
0 commit comments