Bump to v0.2.1.

Former-commit-id: d433d39ac7269479f1b9ac3803e62c5021f41e11
This commit is contained in:
John-David Dalton
2012-05-24 14:39:48 -04:00
parent 8f7667a524
commit bb9ad69219
8 changed files with 148 additions and 132 deletions

View File

@@ -89,15 +89,21 @@
console.log(event.target + '');
},
'onComplete': function() {
var fastest = this.filter('fastest').pluck('name'),
var fastest = this.filter('fastest'),
slowest = this.filter('slowest'),
lodashHz = 1 / (this[0].stats.mean + this[0].stats.moe),
underscoreHz = 1 / (this[1].stats.mean + this[1].stats.moe);
if (fastest.length > 1) {
console.log('It\'s too close to call.');
lodashHz = underscoreHz = Math.min(lodashHz, underscoreHz);
} else {
console.log(fastest + ' is the fastest.');
}
else {
var slowestHz = slowest[0] == this[0] ? lodashHz : underscoreHz,
fastestHz = fastest[0] == this[0] ? lodashHz : underscoreHz,
percent = Math.round(((fastestHz / slowestHz) - 1) * 100);
console.log(fastest[0].name + ' is ' + percent + '% faster.');
}
// add score adjusted for margin of error
score.lodash += lodashHz;