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
* Call specification (":::no-loc text="callspec":::", sequence and timing of function calls) and instrumentation
38
37
39
38
The MSBuild properties in the following table enable profiler integration.
40
39
41
40
Property | Default | Set value to… | Description
42
41
--- | :---: | :---: | ---
43
42
`<WasmProfilers>` | No value | `browser` | Mono profilers to use. Potential values are "`browser`" and "`log`". To use both, separate the values with a semicolon. The `browser` profiler enables integration with the browser's developer tools profiler.
`<WasmNativeDebugSymbols>` | `true` | `true` | Controls building with native debug symbols.
48
-
`<WasmBuildNative>` | `false` | `true` | Controls building the native executable.
49
45
50
46
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.
51
47
@@ -65,7 +61,7 @@ Alternatively, enable features when the app is built with the .NET CLI. The foll
Setting WebAssembly profilers with `<WasmProfilers>browser;</WasmProfilers>` doesn't require AOT (`<RunAOTCompilation>`/`<RunAOTCompilationAfterBuild>` set to `false` or removed from the preceding property group).
64
+
Setting WebAssembly profilers with `<WasmProfilers>browser;</WasmProfilers>` doesn't require AOT.
69
65
70
66
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).
71
67
@@ -81,24 +77,6 @@ Configure the sample interval in the app's project file. In the following exampl
81
77
</PropertyGroup>
82
78
```
83
79
84
-
Alternatively, add the following Blazor start configuration in `wwwroot/index.html` and add `autostart="false"` to the Blazor `<script>` tag. The `{INTERVAL}` placeholder represents the time in milliseconds:
If you want to filter profiled methods, you can use call specification (:::no-loc text="callspec":::). For more information, see [Trace MonoVM profiler events during startup](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md#trace-monovm-profiler-events-during-startup).
@@ -127,24 +105,6 @@ Alternatively, configure `callSpec` in `browserProfilerOptions`. Replace the `{A
127
105
</script>
128
106
```
129
107
130
-
## GC (Garbage Collector) dumps
131
-
132
-
* Manual testing
133
-
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected classes.
134
-
*[`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).
135
-
* Web-based testing
136
-
* Upload the file via HTTP.
137
-
* Parse and validate that the trace contains the expected classes.
138
-
139
-
## Counters trace
140
-
141
-
* Manual testing
142
-
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected counters.
143
-
*[`dotnet-counters collect`](/dotnet/core/diagnostics/dotnet-counters): Open the `.csv`/`.json` output file in Visual Studio and find the expected counters.
144
-
* Web-based testing
145
-
* Upload the file via HTTP.
146
-
* Parse and validate that the trace contains the expected counters.
147
-
148
108
## .NET Core Diagnostics Client Library example
149
109
150
110
Parse and validate NetTrace (`.nettrace`) messages using the .NET Core Diagnostics Client Library:
@@ -158,7 +118,6 @@ For more information, see the [.NET Core diagnostics documentation](/dotnet/core
158
118
159
119
The following example:
160
120
161
-
* Collects a GC (Garbage Collector) dump of the live .NET process.
0 commit comments