[wasm] Fix perf pipeline (#87469)
authorAnkit Jain <radical@gmail.com>
Tue, 13 Jun 2023 20:05:47 +0000 (16:05 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2023 20:05:47 +0000 (16:05 -0400)
* [wasm] Use the current `test-main.js` instead of the one for 7.0

* [wasm] perf: Add `--module` arg for v8, to support the es6 module

* [wasm] perf: Use tar for BrowserWasm for perf runs

.. because the new image does not have `zip` installed.

* remove debug bits

eng/pipelines/coreclr/perf-wasm-prepare-artifacts-steps.yml
eng/pipelines/coreclr/templates/perf-job.yml
eng/pipelines/coreclr/templates/run-scenarios-job.yml
eng/testing/performance/performance-setup.sh

index 3015f0d6cb1413e3c2ff01d1d54818f93fe01d02..4f5a1113c3eb0c44842c2f7c9af255b03c06583b 100644 (file)
@@ -25,5 +25,6 @@ steps:
       includeRootFolder: true
       displayName: Browser Wasm Artifacts
       artifactName: BrowserWasm
-      archiveType: zip
-      archiveExtension: .zip
+      archiveType: tar
+      tarCompression: gz
+      archiveExtension: '.tar.gz'
index 9beaf0884e6999c8c6b51ac3294339f81a964c2c..d0bc486d4b40417675e4b609ec7f6971dfb03e88 100644 (file)
@@ -179,25 +179,24 @@ jobs:
         - template: /eng/pipelines/common/download-artifact-step.yml
           parameters:
             unpackFolder: $(librariesDownloadDir)/BrowserWasm
-            artifactFileName: BrowserWasm.zip
+            artifactFileName: BrowserWasm.tar.gz
             artifactName: BrowserWasm
             displayName: BrowserWasm
       - ${{ if ne(parameters.downloadSpecificBuild.buildId, '') }}:
         - template: /eng/pipelines/common/download-specific-artifact-step.yml
           parameters:
             unpackFolder: $(librariesDownloadDir)/BrowserWasm
-            artifactFileName: BrowserWasm.zip
+            artifactFileName: BrowserWasm.tar.gz
             artifactName: BrowserWasm
             displayName: BrowserWasm
             ${{ insert }}: ${{ parameters.downloadSpecificBuild }}
 
-      # Using test-main-7.0.js, since we are building with tfm:net7.0
       - script: >-
           mkdir -p $(librariesDownloadDir)/bin/wasm/wasm-data &&
           mkdir -p $(librariesDownloadDir)/bin/wasm/dotnet &&
           cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest/* $(librariesDownloadDir)/bin/wasm/dotnet &&
           cp -r $(librariesDownloadDir)/BrowserWasm/staging/built-nugets $(librariesDownloadDir)/bin/wasm &&
-          cp src/mono/wasm/Wasm.Build.Tests/data/test-main-7.0.js $(librariesDownloadDir)/bin/wasm/wasm-data/test-main.js &&
+          cp src/mono/wasm/test-main.js $(librariesDownloadDir)/bin/wasm/wasm-data/test-main.js &&
           find $(librariesDownloadDir)/bin/wasm -type d &&
           find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \;
         displayName: "Create wasm directory (Linux)"
index ba6875b6a7fec32ca57c28098c0d1324c71bd8cc..8294355bc93947ebc65f9284f10fb2b75e4e2db6 100644 (file)
@@ -138,12 +138,11 @@ jobs:
       displayName: Run ci setup script (Linux/MAC)
       condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
     # copy wasm packs if running on wasm
-    # Using test-main-7.0.js, since we are building with tfm:net7.0
     - script: >-
         mkdir -p $(librariesDownloadDir)/bin/wasm/data &&
         cp -r $(librariesDownloadDir)/BrowserWasm/staging/dotnet-latest $(librariesDownloadDir)/bin/wasm &&
         cp -r $(librariesDownloadDir)/BrowserWasm/staging/built-nugets $(librariesDownloadDir)/bin/wasm &&
-        cp src/mono/wasm/Wasm.Build.Tests/data/test-main-7.0.js $(librariesDownloadDir)/bin/wasm/data/test-main.js &&
+        cp src/mono/wasm/test-main.js $(librariesDownloadDir)/bin/wasm/data/test-main.js &&
         find $(librariesDownloadDir)/bin/wasm -type f -exec chmod 664 {} \;
       displayName: "Create wasm directory (Linux)"
       condition: and(succeeded(), eq('${{ parameters.runtimeType }}', 'wasm'))
index e69ab945cf91bca7cd1a4ee02696b5d5f2559906..599096d54f098b01d36a63d4e299b284e9b4193a 100755 (executable)
@@ -403,7 +403,14 @@ if [[ -n "$wasm_bundle_directory" ]]; then
     wasm_bundle_directory_path=$payload_directory
     mv $wasm_bundle_directory/* $wasm_bundle_directory_path
     find $wasm_bundle_directory_path -type d
-    extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmEngine /home/helixbot/.jsvu/$javascript_engine --cli \$HELIX_CORRELATION_PAYLOAD/dotnet/dotnet --wasmDataDir \$HELIX_CORRELATION_PAYLOAD/wasm-data"
+    wasm_args="--expose_wasm"
+    if [ "$javascript_engine" == "v8" ]; then
+        # for es6 module support
+        wasm_args="$wasm_args --module"
+    fi
+
+    # Workaround: escaping the quotes around `--wasmArgs=..` so they get retained for the actual command line
+    extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmEngine /home/helixbot/.jsvu/$javascript_engine \\\"--wasmArgs=$wasm_args \\\" --cli \$HELIX_CORRELATION_PAYLOAD/dotnet/dotnet --wasmDataDir \$HELIX_CORRELATION_PAYLOAD/wasm-data"
     if [[ "$wasmaot" == "true" ]]; then
         extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --aotcompilermode wasm --buildTimeout 3600"
     fi