From 26789a1ae997fe6c3409b88ad8453feb53b196a4 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 12 Dec 2022 23:48:37 +0100 Subject: [PATCH] [wasm] Let browser-bench post bootstrap flag 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);