Skip to content

Commit 1903bce

Browse files
committed
cleanup
1 parent 8bdb530 commit 1903bce

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

JetStreamDriver.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ class Driver {
467467
}
468468

469469
async initialize() {
470-
window.addEventListener("error", (e) => this.pushError(benchmark, e.error));
470+
window.addEventListener("error", (e) => this.pushError("driver startup", e.error));
471471
await this.prefetchResourcesForBrowser();
472472
await this.fetchResources();
473473
this.prepareToRun();
@@ -551,20 +551,14 @@ class Driver {
551551

552552
resultsObjectOld()
553553
{
554-
let testResults = {};
554+
let results = {};
555555
for (const benchmark of this.benchmarks) {
556556
const subResults = {}
557557
const subScores = benchmark.subScores();
558558
for (const name in subScores) {
559-
subResults[name] = {
560-
"metrics": {
561-
"Time": {
562-
"current": [toTimeValue(subScores[name])]
563-
}
564-
}
565-
};
559+
subResults[name] = {"metrics": {"Time": {"current": [toTimeValue(subScores[name])]}}};
566560
}
567-
testResults[benchmark.name] = {
561+
results[benchmark.name] = {
568562
"metrics" : {
569563
"Score" : {"current" : [benchmark.score]},
570564
"Time": ["Geometric"],
@@ -573,14 +567,7 @@ class Driver {
573567
};
574568
}
575569

576-
const results = {
577-
"JetStream3.0": {
578-
"metrics" : {
579-
"Score" : ["Geometric"]
580-
},
581-
"tests" : testResults
582-
}
583-
};
570+
results = {"JetStream3.0": {"metrics" : {"Score" : ["Geometric"]}, "tests" : results}};
584571
return results;
585572
}
586573

0 commit comments

Comments
 (0)