- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.2k
 
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Diagnostics-monoos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm
Milestone
Description
Test that .nettrace file produced by event pipe diagnostics and contains expected data
- in folder 
src\mono\wasm\Wasm.Build.Tests\add new test class - it should be based on template/asset in 
src\mono\wasm\testassets\BlazorBasicTestApp\ - the new test should build the project with 
<WasmPerfInstrumentation>all,interval=0</WasmPerfInstrumentation>and<WasmPerfTracing>true</WasmPerfTracing>msbuild properties - after app start, the test should navigate the browser to Counter page. There is existing 
CheckCounterand_executeAfterLoadedin the base class that can be used as inspiration. - we should execute 
globalThis.getDotnetRuntime(0).collectCpuSamples({durationSeconds: 5})and capture the promise - then the test should click "Click me" button few times
 - then way for the promise with the trace to resolve
 - use 
fetchwithPOSTto upload the trace bytes into the server 
We also need to change the server to store the trace on disk, where we will read it via Microsoft.Diagnostics.Tracing.TraceEvent nuget package.
There is EventPipeEventSource in that package.
There is relatedt documentation at https://github.com/microsoft/perfview/blob/main/documentation/TraceEvent/TraceEventLibrary.md
Once we open the trace, we should validate that the trace contains events with stack frame for IncrementCount method of the counter page.
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-Diagnostics-monoos-browserBrowser variant of arch-wasmBrowser variant of arch-wasm