Skip to content

Commit

Permalink
[wasm] fix perf after test renames (#1846)
Browse files Browse the repository at this point in the history
* fix perf after renames in dotnet/runtime#61596
  • Loading branch information
pavelsavara authored Nov 19, 2021
1 parent 5927a6e commit db0a88a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 13 deletions.
7 changes: 0 additions & 7 deletions docs/articles/configs/toolchains.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,6 @@ And FINALLY build Mono Runtime with Web Assembly support:
./build.sh --arch wasm --os Browser -c release
```

Before you run the benchmarks, you need to make sure that following two file exists:

```cmd
runtime/src/mono/wasm/runtime-test.js
runtime/build.sh
```

And that you have .NET 5 feed added to your `nuget.config` file:

```xml
Expand Down
2 changes: 0 additions & 2 deletions samples/BenchmarkDotNet.Samples/IntroWasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public class IntroWasmCmdConfig
// --runtimes Wasm
// path to dotnet cli
// --cli /home/adam/projects/runtime/dotnet.sh
// path to main js:
// --wasmMainJs /home/adam/projects/runtime/src/mono/wasm/runtime-test.js
public static void Run(string[] args) => BenchmarkSwitcher.FromAssembly(typeof(IntroWasmCmdConfig).Assembly).Run(args);

[Benchmark]
Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Templates/WasmAotCsProj.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PublishTrimmed>true</PublishTrimmed>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
<RunAOTCompilation>true</RunAOTCompilation>
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\runtime-test.js</WasmMainJSPath>
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\test-main.js</WasmMainJSPath>
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<WasmNativeWorkload>false</WasmNativeWorkload>
Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Templates/WasmCsProj.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<PublishTrimmed>false</PublishTrimmed>
<RunAOTCompilation>false</RunAOTCompilation>
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\runtime-test.js</WasmMainJSPath>
<WasmMainJSPath>$(RuntimeSrcDir)\src\mono\wasm\test-main.js</WasmMainJSPath>
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<WasmNativeWorkload>false</WasmNativeWorkload>
Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Toolchains/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private ProcessStartInfo CreateStartInfo(BenchmarkCase benchmarkCase, ArtifactsP
case WasmRuntime wasm:
start.FileName = wasm.JavaScriptEngine;
start.RedirectStandardInput = false;
start.Arguments = $"{wasm.JavaScriptEngineArguments} runtime.js -- --run {artifactsPaths.ProgramName}.dll {args} ";
start.Arguments = $"{wasm.JavaScriptEngineArguments} main.js -- --run {artifactsPaths.ProgramName}.dll {args} ";
start.WorkingDirectory = artifactsPaths.BinariesDirectoryPath;
break;
case MonoAotLLVMRuntime _:
Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Toolchains/MonoWasm/WasmGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected void GenerateProjectInterpreter(BuildPartition buildPartition, Artifac
}
}

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

protected override string GetBinariesDirectoryPath(string buildArtifactsDirectoryPath, string configuration)
{
Expand Down

0 comments on commit db0a88a

Please sign in to comment.