From 2e351885ee533409463a1c0823e22fd7745fe5e6 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 13 Dec 2022 15:17:47 +0100 Subject: [PATCH] [wasm] Let browser-bench post bootstrap flag (#79573) This helps our perf measurements infrastructure to detect successful bootstrap of the bench run --- src/mono/sample/wasm/browser-bench/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mono/sample/wasm/browser-bench/main.js b/src/mono/sample/wasm/browser-bench/main.js index 0d3d54fab14b88..403fd89b78eb55 100644 --- a/src/mono/sample/wasm/browser-bench/main.js +++ b/src/mono/sample/wasm/browser-bench/main.js @@ -101,10 +101,18 @@ class MainApp { this.yieldBench(); } + bootstraped = false; yieldBench() { let promise = runBenchmark(); promise.then(ret => { + if (!this.bootstraped) { + fetch("/bootstrap.flag", { + method: 'POST', + body: "ok" + }).then(r => { console.log("bootstrap post request complete, response: ", r); }); + this.bootstraped = true; + } document.getElementById("out").innerHTML += ret; if (ret.length > 0) { setTimeout(() => { this.yieldBench(); }, 0);