Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions JetStreamDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ class Benchmark {
__benchmark.runIteration();
let end = performance.now();

performanceMeasure(iterationMarkLabel, iterationStartMark);
performance.measure(iterationMarkLabel, iterationMarkLabel);

${this.postIterationCode}

Expand Down Expand Up @@ -732,19 +732,11 @@ class Benchmark {
const isInBrowser = ${isInBrowser};
const isD8 = ${isD8};
if (typeof performance.mark === 'undefined') {
performance.mark = function() {};
performance.mark = function(name) { return { name }};
}
if (typeof performance.measure === 'undefined') {
performance.measure = function() {};
}
function performanceMeasure(name, mark) {
// D8 does not implement the official web API.
// Also the performance.mark polyfill returns an undefined mark.
if (isD8 || typeof mark === "undefined")
performance.measure(name, mark);
else
performance.measure(name, mark.name);
}
`);

if (!!this.plan.deterministicRandom) {
Expand Down Expand Up @@ -1149,7 +1141,7 @@ class AsyncBenchmark extends DefaultBenchmark {
await __benchmark.runIteration();
let end = performance.now();

performanceMeasure(iterationMarkLabel, iterationStartMark);
performance.measure(iterationMarkLabel, iterationMarkLabel);

${this.postIterationCode}

Expand Down Expand Up @@ -1288,7 +1280,7 @@ class WSLBenchmark extends Benchmark {
benchmark.buildStdlib();
results.push(performance.now() - start);

performanceMeasure(markLabel, startMark);
performance.measure(markLabel, markLabel);
}

{
Expand All @@ -1299,7 +1291,7 @@ class WSLBenchmark extends Benchmark {
benchmark.run();
results.push(performance.now() - start);

performanceMeasure(markLabel, startMark);
performance.measure(markLabel, markLabel);
}

top.currentResolve(results);
Expand Down
Loading