Skip to content

Commit 62ebbfa

Browse files
authored
Apply suggestions from code review
1 parent e03832e commit 62ebbfa

File tree

2 files changed

+2
-44
lines changed

2 files changed

+2
-44
lines changed

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

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,18 @@ dotnet workload install wasm-tools
3030

3131
App code can be manually profiled using the diagnostic profiler in a browser's developer tools console.
3232

33-
Built-in diagnostic counters are available to track:
33+
Built-in diagnostic features are available to track:
3434

3535
* [Ahead-of-time (AOT) compilation](xref:blazor/tooling/webassembly#ahead-of-time-aot-compilation)
36-
* Code interpolation
3736
* Call specification (":::no-loc text="callspec":::", sequence and timing of function calls) and instrumentation
3837

3938
The MSBuild properties in the following table enable profiler integration.
4039

4140
Property | Default | Set value to… | Description
4241
--- | :---: | :---: | ---
4342
`<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.
44-
`<RunAOTCompilation>`| `false` | `true` | Controls AOT compilation.
45-
`<RunAOTCompilationAfterBuild>` | `false` | `true` | Controls AOT compilation after build. By default, it's run only for publish.
4643
`<WasmNativeStrip>` | `true` | `false` | Controls stripping the native executable.
4744
`<WasmNativeDebugSymbols>` | `true` | `true` | Controls building with native debug symbols.
48-
`<WasmBuildNative>` | `false` | `true` | Controls building the native executable.
4945

5046
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.
5147

@@ -65,7 +61,7 @@ Alternatively, enable features when the app is built with the .NET CLI. The foll
6561
/p:WasmProfilers=browser /p:WasmNativeStrip=false /p:WasmNativeDebugSymbols=true
6662
```
6763

68-
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.
6965

7066
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).
7167

@@ -81,24 +77,6 @@ Configure the sample interval in the app's project file. In the following exampl
8177
</PropertyGroup>
8278
```
8379

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:
85-
86-
```html
87-
<script src="_framework/blazor.webassembly#[.{fingerprint}].js"
88-
autostart="false"></script>
89-
<script>
90-
Blazor.start({
91-
configureRuntime: function (builder) {
92-
builder.withConfig({
93-
browserProfilerOptions: {
94-
sampleIntervalMs: {INTERVAL},
95-
}
96-
});
97-
}
98-
});
99-
</script>
100-
```
101-
10280
## Call specification (:::no-loc text="callspec":::)
10381

10482
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
127105
</script>
128106
```
129107

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-
148108
## .NET Core Diagnostics Client Library example
149109

150110
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
158118

159119
The following example:
160120

161-
* Collects a GC (Garbage Collector) dump of the live .NET process.
162121
* Collects performance counters for 60 seconds.
163122
* Collects CPU counters for 60 seconds.
164123

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dotnet workload install wasm-tools
4040
Built-in diagnostic counters are available to track:
4141

4242
* [Ahead-of-time (AOT) compilation](xref:blazor/tooling/webassembly#ahead-of-time-aot-compilation)
43-
* Code interpolation
4443

4544
## GC (Garbage Collector) dumps
4645

0 commit comments

Comments
 (0)