Skip to content

Commit 45c2d58

Browse files
committed
Updates
1 parent a40c1a5 commit 45c2d58

File tree

2 files changed

+21
-39
lines changed

2 files changed

+21
-39
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,6 @@ Add `callspec` to the `browser` WebAssembly profiler in the `<WasmProfilers>` el
8787
<WasmProfilers>browser:callspec=N:{APP NAMESPACE};</WasmProfilers>
8888
```
8989

90-
Alternatively, configure `callSpec` in `browserProfilerOptions`. Replace the `{APP NAMESPACE}` placeholder in the following example with the app's namespace:
91-
92-
```html
93-
<script src="_framework/blazor.webassembly#[.{fingerprint}].js"
94-
autostart="false"></script>
95-
<script>
96-
Blazor.start({
97-
configureRuntime: function (builder) {
98-
builder.withConfig({
99-
browserProfilerOptions: {
100-
callSpec: "N:{APP NAMESPACE}",
101-
}
102-
});
103-
}
104-
});
105-
</script>
106-
```
107-
10890
## .NET Core Diagnostics Client Library example
10991

11092
Parse and validate NetTrace (`.nettrace`) messages using the .NET Core Diagnostics Client Library:
@@ -126,13 +108,11 @@ In the project file (`.csproj`), the properties in the following table enable in
126108
Property | Default | Set value to&hellip; | Description
127109
--- | :---: | :---: | ---
128110
`<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.
129-
`<WasmPerfTracing>` | `false` | `true` | Controls diagnostic server tracing.
130111
`<WasmPerfInstrumentation>` | `false` | `true` | Controls CPU sampling instrumentation for diagnostic server.
131112

132113
```xml
133114
<PropertyGroup>
134115
<WasmProfilers>browser</WasmProfilers>
135-
<WasmPerfTracing>true</WasmPerfTracing>
136116
<WasmPerfInstrumentation>true</WasmPerfInstrumentation>
137117
</PropertyGroup>
138118
```

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,19 @@ dotnet workload install wasm-tools
3737
* Upload the file via HTTP.
3838
* Parse and validate that the trace contains the expected method calls.
3939

40-
Built-in diagnostic counters are available to track [Ahead-of-time (AOT) compilation](xref:blazor/tooling/webassembly#ahead-of-time-aot-compilation).
41-
4240
## GC (Garbage Collector) dumps
4341

44-
* Manual testing
45-
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected classes.
46-
* [`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).
47-
* Web-based testing
48-
* Upload the file via HTTP.
49-
* Parse and validate that the trace contains the expected classes.
42+
* Manual testing:
43+
44+
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected classes.
45+
* [`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).
5046

5147
## Counters trace
5248

53-
* Manual testing
54-
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected counters.
55-
* [`dotnet-counters collect`](/dotnet/core/diagnostics/dotnet-counters): Open the `.csv`/`.json` output file in Visual Studio and find the expected counters.
56-
* Web-based testing
57-
* Upload the file via HTTP.
58-
* Parse and validate that the trace contains the expected counters.
49+
Manual testing:
50+
51+
* Browser developer tools: Download the `.json` output file, open the file in Visual Studio, and find the expected counters.
52+
* [`dotnet-counters collect`](/dotnet/core/diagnostics/dotnet-counters): Open the `.csv`/`.json` output file in Visual Studio and find the expected counters.
5953

6054
## .NET Core Diagnostics Client Library example
6155

@@ -107,14 +101,22 @@ The [`Timing-Allow-Origin` HTTP header](https://developer.mozilla.org/docs/Web/H
107101
Browser developer tools console calls in the following example that trigger profiling:
108102

109103
* `collectGcDump`: Collect a GC (Garbage Collector) dump.
104+
105+
```javascript
106+
globalThis.getDotnetRuntime(0).collectGcDump();
107+
```
108+
110109
* `collectPerfCounters(durationSeconds)`: Collect general diagnostic counters.
110+
111+
```javascript
112+
globalThis.getDotnetRuntime(0).collectPerfCounters({durationSeconds: 60});
113+
```
114+
111115
* `collectCpuSamples(durationSeconds)`: Collect CPU diagnostic counters.
112116

113-
```javascript
114-
globalThis.getDotnetRuntime(0).collectGcDump();
115-
globalThis.getDotnetRuntime(0).collectPerfCounters({durationSeconds: 60});
116-
globalThis.getDotnetRuntime(0).collectCpuSamples({durationSeconds: 60});
117-
```
117+
```javascript
118+
globalThis.getDotnetRuntime(0).collectCpuSamples({durationSeconds: 60});
119+
```
118120

119121
## Additional resources
120122

0 commit comments

Comments
 (0)