Skip to content

Commit 46251c4

Browse files
committed
cleanup
1 parent ccecf72 commit 46251c4

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

JetStreamDriver.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -533,24 +533,9 @@ class Driver {
533533
return this.runBenchmarkResultsObject();
534534
if (format != "simple")
535535
throw Error(`Unknown result format '${format}'`);
536-
const results = {__proto__: null};
537-
for (const benchmark of this.benchmarks) {
538-
if (!benchmark.isDone)
539-
continue;
540-
if (!benchmark.isSuccess) {
541-
results[benchmark.name] = "FAILED";
542-
} else {
543-
results[benchmark.name] = {
544-
Score: benchmark.score,
545-
...benchmark.subScores(),
546-
547-
};
548-
}
549-
}
550-
return results;
536+
return simpleResultsObject();
551537
}
552538

553-
554539
runBenchmarkResultsObject()
555540
{
556541
let results = {};
@@ -573,6 +558,24 @@ class Driver {
573558
return results;
574559
}
575560

561+
simpleResultsObject() {
562+
const results = {__proto__: null};
563+
for (const benchmark of this.benchmarks) {
564+
if (!benchmark.isDone)
565+
continue;
566+
if (!benchmark.isSuccess) {
567+
results[benchmark.name] = "FAILED";
568+
} else {
569+
results[benchmark.name] = {
570+
Score: benchmark.score,
571+
...benchmark.subScores(),
572+
573+
};
574+
}
575+
}
576+
return results;
577+
}
578+
576579
resultsJSON(format = "run-benchmark")
577580
{
578581
return JSON.stringify(this.resultsObject(format));

0 commit comments

Comments
 (0)