Skip to content
Prev Previous commit
Next Next commit
feedback
  • Loading branch information
pavelsavara committed Jun 23, 2022
commit 89166f74d7bdf1e6537fe80616674251c3a980c7
19 changes: 9 additions & 10 deletions src/mono/sample/wasm/browser-profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@

```
await createDotnetRuntime(() => ({
onConfigLoaded: () => {
...

if (config.enable_profiler)
{
config.aot_profiler_options = {
write_at: "<Namespace.Class::StopProfile>",
send_to: "System.Runtime.InteropServices.JavaScript.Runtime::DumpAotProfileData"
}
}
onConfigLoaded: () => {
if (config.enable_profiler) {
config.aot_profiler_options = {
write_at: "<Namespace.Class::StopProfile>",
send_to: "System.Runtime.InteropServices.JavaScript.Runtime::DumpAotProfileData"
}
}
},
}));
```

3. Call the `write_at` method at the end of the app, either in C# or in JS. To call the `write_at` method in JS, make use of bindings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<UseMonoRuntime>true</UseMonoRuntime>
<WasmMainJSPath>main.js</WasmMainJSPath>
<OutputType>Exe</OutputType>
<WasmEnableES6>true</WasmEnableES6>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<UseMonoRuntime>true</UseMonoRuntime>
<WasmMainJSPath>main.mjs</WasmMainJSPath>
<OutputType>Exe</OutputType>
<WasmEnableES6>true</WasmEnableES6>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>

Expand Down