Don't include tests that error in the total score of the perf.js suite. [ci skip]

Former-commit-id: ea71d436ecec9297b2d991e9f17e3665a9e53d23
This commit is contained in:
John-David Dalton
2013-04-13 16:58:28 -07:00
parent 883d5917f5
commit bb8855b628

View File

@@ -182,6 +182,14 @@
aHz = getHz(this[0]), aHz = getHz(this[0]),
bHz = getHz(this[1]); bHz = getHz(this[1]);
for (var index = 0, length = this.length; index < length; index++) {
var bench = this[index];
if (bench.error) {
var errored = true;
log(bench.error);
}
}
if (!errored) {
if (fastest.length > 1) { if (fastest.length > 1) {
log('It\'s too close to call.'); log('It\'s too close to call.');
aHz = bHz = slowestHz; aHz = bHz = slowestHz;
@@ -198,7 +206,7 @@
// add score adjusted for margin of error // add score adjusted for margin of error
score.a += aHz; score.a += aHz;
score.b += bHz; score.b += bHz;
}
// remove current suite from queue // remove current suite from queue
suites.shift(); suites.shift();