Skip to content

Commit eb35a44

Browse files
authored
[wasm] Update steps to run the benchmarks against local runtime build (#4333)
* Update docs * add blank lines * minor change * update doc as per markdown linting rules * revert .mjs renaming * feedback
1 parent e5fadfb commit eb35a44

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

docs/benchmarking-workflow-dotnet-runtime.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,25 @@ In order to run the benchmarks against local [dotnet/runtime](https://github.com
174174

175175
This would produce `/path/to/dotnet/runtime/artifacts/bin/dotnet-latest`, which should be used to run the benchmarks.
176176

177-
3. And you need `/path/to/dotnet/runtime/src/mono/wasm/test-main.js`
177+
3. And you need `/path/to/dotnet/runtime/src/mono/browser/test-main.js`
178178

179179
#### Install v8 engine
180180

181181
Make sure you have the v8 engine installed and in the PATH. Follow the installation [instructions](https://github.com/dotnet/runtime/tree/main/src/mono/browser#installation-of-javascript-engines) if you don't have v8 installed.
182182

183183
#### Run the benchmarks with the interpreter
184184

185+
1. Configure NuGet Feeds to include local packages. Open the `NuGet.config` and modify `packageSources` section
186+
187+
```xml
188+
<add key="dotnet-runtime" value="/path/to/dotnet/runtime/artifacts/packages/Release/Shipping" />
189+
```
190+
191+
2. Run the benchmark
192+
185193
```cmd
186194
/path/to/dotnet/performance$ python3 ./scripts/benchmarks_ci.py -f net9.0 --dotnet-path </path/to/dotnet/runtime/>artifacts/bin/dotnet-latest --wasm --run-isolated --bdn-artifacts artifacts/BenchmarkDotNet.Artifacts
187-
--bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoInterpreter NoWASM NoMono --logBuildOutput --wasmDataDir </path/to/dotnet/runtime>/src/mono/wasm --filter <filter>"
195+
--bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoInterpreter NoWASM NoMono --logBuildOutput --wasmArgs=\"--module\" --wasmDataDir </path/to/dotnet/runtime>/src/mono/browser --filter <filter>"
188196
```
189197

190198
#### Run the benchmarks with AOT
@@ -193,7 +201,7 @@ Essentially, add `--aotcompilermode wasm` to the `--bdn-arguments=".."`:
193201

194202
```cmd
195203
/path/to/dotnet/performance$ python3 ./scripts/benchmarks_ci.py --csproj src/benchmarks/micro/MicroBenchmarks.csproj -f net9.0 --dotnet-path </path/to/dotnet/runtime/>artifacts/bin/dotnet-latest --wasm --run-isolated --bdn-artifacts artifacts/BenchmarkDotNet.Artifacts
196-
--bdn-arguments="--category-exclusion-filter NoInterpreter NoWASM NoMono --aotcompilermode wasm --logBuildOutput --buildTimeout 3600 --wasmDataDir </path/to/dotnet/runtime>/src/mono/wasm --filter <filter>"
204+
--bdn-arguments="--category-exclusion-filter NoInterpreter NoWASM NoMono --aotcompilermode wasm --logBuildOutput --buildTimeout 3600 --wasmArgs=\"--module\" --wasmDataDir </path/to/dotnet/runtime>/src/mono/browser --filter <filter>"
197205
```
198206

199207
#### Note about "file ... being used by another process" error

eng/common/template-guidance.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Basic guidance is:
1212

1313
See [azure-pipelines.yml](../../azure-pipelines.yml) (templates-official example) or [azure-pipelines-pr.yml](../../azure-pipelines-pr.yml) (templates example) for examples.
1414

15-
#### The `templateIs1ESManaged` parameter
15+
### The `templateIs1ESManaged` parameter
1616

1717
The `templateIs1ESManaged` is available on most templates and affects which of the variants is used for nested templates. See [Development Notes](#development-notes) below for more information on the `templateIs1ESManaged1 parameter.
1818

@@ -23,6 +23,7 @@ The `templateIs1ESManaged` is available on most templates and affects which of t
2323
1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline.
2424

2525
Example:
26+
2627
``` yaml
2728
# azure-pipelines.yml
2829
extends:
@@ -57,9 +58,9 @@ extends:
5758
5859
Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`).
5960

60-
# Development notes
61+
## Development notes
6162

62-
**Folder / file structure**
63+
### Folder / file structure
6364

6465
``` text
6566
eng\common\

0 commit comments

Comments
 (0)