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
Alternatively, configure `callSpec` in `browserProfilerOptions`. Replace the `{APP NAMESPACE}` placeholder in the following example with the app's namespace:
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
126
108
Property | Default | Set value to… | Description
127
109
--- | :---: | :---: | ---
128
110
`<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.
130
111
`<WasmPerfInstrumentation>` | `false` | `true` | Controls CPU sampling instrumentation for diagnostic server.
* Parse and validate that the trace contains the expected method calls.
39
39
40
-
Built-in diagnostic counters are available to track [Ahead-of-time (AOT) compilation](xref:blazor/tooling/webassembly#ahead-of-time-aot-compilation).
41
-
42
40
## GC (Garbage Collector) dumps
43
41
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).
50
46
51
47
## Counters trace
52
48
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.
59
53
60
54
## .NET Core Diagnostics Client Library example
61
55
@@ -107,14 +101,22 @@ The [`Timing-Allow-Origin` HTTP header](https://developer.mozilla.org/docs/Web/H
107
101
Browser developer tools console calls in the following example that trigger profiling:
108
102
109
103
*`collectGcDump`: Collect a GC (Garbage Collector) dump.
104
+
105
+
```javascript
106
+
globalThis.getDotnetRuntime(0).collectGcDump();
107
+
```
108
+
110
109
*`collectPerfCounters(durationSeconds)`: Collect general diagnostic counters.
0 commit comments