Skip to content

Commit db0a88a

Browse files
authored
[wasm] fix perf after test renames (#1846)
* fix perf after renames in dotnet/runtime#61596
1 parent 5927a6e commit db0a88a

File tree

6 files changed

+4
-13
lines changed

6 files changed

+4
-13
lines changed

docs/articles/configs/toolchains.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,6 @@ And FINALLY build Mono Runtime with Web Assembly support:
336336
./build.sh --arch wasm --os Browser -c release
337337
```
338338

339-
Before you run the benchmarks, you need to make sure that following two file exists:
340-
341-
```cmd
342-
runtime/src/mono/wasm/runtime-test.js
343-
runtime/build.sh
344-
```
345-
346339
And that you have .NET 5 feed added to your `nuget.config` file:
347340

348341
```xml

samples/BenchmarkDotNet.Samples/IntroWasm.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public class IntroWasmCmdConfig
1818
// --runtimes Wasm
1919
// path to dotnet cli
2020
// --cli /home/adam/projects/runtime/dotnet.sh
21-
// path to main js:
22-
// --wasmMainJs /home/adam/projects/runtime/src/mono/wasm/runtime-test.js
2321
public static void Run(string[] args) => BenchmarkSwitcher.FromAssembly(typeof(IntroWasmCmdConfig).Assembly).Run(args);
2422

2523
[Benchmark]

src/BenchmarkDotNet/Templates/WasmAotCsProj.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PublishTrimmed>true</PublishTrimmed>
1414
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
1515
<RunAOTCompilation>true</RunAOTCompilation>
16-
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\runtime-test.js</WasmMainJSPath>
16+
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\test-main.js</WasmMainJSPath>
1717
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>
1818
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
1919
<WasmNativeWorkload>false</WasmNativeWorkload>

src/BenchmarkDotNet/Templates/WasmCsProj.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1313
<PublishTrimmed>false</PublishTrimmed>
1414
<RunAOTCompilation>false</RunAOTCompilation>
15-
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\runtime-test.js</WasmMainJSPath>
15+
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\test-main.js</WasmMainJSPath>
1616
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>
1717
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
1818
<WasmNativeWorkload>false</WasmNativeWorkload>

src/BenchmarkDotNet/Toolchains/Executor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private ProcessStartInfo CreateStartInfo(BenchmarkCase benchmarkCase, ArtifactsP
117117
case WasmRuntime wasm:
118118
start.FileName = wasm.JavaScriptEngine;
119119
start.RedirectStandardInput = false;
120-
start.Arguments = $"{wasm.JavaScriptEngineArguments} runtime.js -- --run {artifactsPaths.ProgramName}.dll {args} ";
120+
start.Arguments = $"{wasm.JavaScriptEngineArguments} main.js -- --run {artifactsPaths.ProgramName}.dll {args} ";
121121
start.WorkingDirectory = artifactsPaths.BinariesDirectoryPath;
122122
break;
123123
case MonoAotLLVMRuntime _:

src/BenchmarkDotNet/Toolchains/MonoWasm/WasmGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected void GenerateProjectInterpreter(BuildPartition buildPartition, Artifac
9191
}
9292
}
9393

94-
protected override string GetExecutablePath(string binariesDirectoryPath, string programName) => Path.Combine(binariesDirectoryPath, "runtime.js");
94+
protected override string GetExecutablePath(string binariesDirectoryPath, string programName) => Path.Combine(binariesDirectoryPath, "main.js");
9595

9696
protected override string GetBinariesDirectoryPath(string buildArtifactsDirectoryPath, string configuration)
9797
{

0 commit comments

Comments
 (0)