Skip to content

Commit 020eb7b

Browse files
committed
add performance.mark
1 parent 901c95b commit 020eb7b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

JetStreamDriver.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,17 +1206,28 @@ class WSLBenchmark extends Benchmark {
12061206
get runnerCode() {
12071207
return `
12081208
let benchmark = new Benchmark();
1209+
const benchmarkName = "${this.name}";
12091210
let results = [];
12101211
{
1212+
const markLabel = benchmarkName + "-stlib";
1213+
const startMark = performance.mark(markLabel);
1214+
12111215
let start = performance.now();
12121216
benchmark.buildStdlib();
12131217
results.push(performance.now() - start);
1218+
1219+
performanceMeasure(markLabel, startMark);
12141220
}
12151221
12161222
{
1223+
const markLabel = benchmarkName + "-mainRun";
1224+
const startMark = performance.mark(markLabel);
1225+
12171226
let start = performance.now();
12181227
benchmark.run();
12191228
results.push(performance.now() - start);
1229+
1230+
performanceMeasure(markLabel, startMark);
12201231
}
12211232
12221233
top.currentResolve(results);

0 commit comments

Comments
 (0)