Skip to content

Commit

Permalink
[wasm] Let browser-bench post bootstrap flag (#79573)
Browse files Browse the repository at this point in the history
This helps our perf measurements infrastructure to detect successful
bootstrap of the bench run
  • Loading branch information
radekdoulik authored Dec 13, 2022
1 parent 52e86d8 commit 2e35188
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mono/sample/wasm/browser-bench/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2e35188

Please sign in to comment.