mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Cleanup console messages in perf.js.
Former-commit-id: b3e669d46f21d39f96873167557b4ede80458beb
This commit is contained in:
@@ -143,8 +143,8 @@
|
|||||||
var fastestTotalHz = Math.max(score.lodash, score.underscore),
|
var fastestTotalHz = Math.max(score.lodash, score.underscore),
|
||||||
slowestTotalHz = Math.min(score.lodash, score.underscore),
|
slowestTotalHz = Math.min(score.lodash, score.underscore),
|
||||||
totalPercent = formatNumber(Math.round(((fastestTotalHz / slowestTotalHz) - 1) * 100)),
|
totalPercent = formatNumber(Math.round(((fastestTotalHz / slowestTotalHz) - 1) * 100)),
|
||||||
totalX = formatNumber((fastestTotalHz / slowestTotalHz).toFixed(2)),
|
totalX = fastestTotalHz / slowestTotalHz,
|
||||||
message = ' is ' + totalPercent + '% (' + totalX + 'x) faster than ';
|
message = ' is ' + totalPercent + '% ' + (totalX == 1 ? '' : '(' + formatNumber(totalX.toFixed(2)) + 'x) ') + 'faster than ';
|
||||||
|
|
||||||
// report results
|
// report results
|
||||||
if (score.lodash >= score.underscore) {
|
if (score.lodash >= score.underscore) {
|
||||||
@@ -540,6 +540,7 @@
|
|||||||
log(Benchmark.platform + '');
|
log(Benchmark.platform + '');
|
||||||
}
|
}
|
||||||
// start suites
|
// start suites
|
||||||
|
log('\nSit back and relax, this may take a while.');
|
||||||
suites[0].run();
|
suites[0].run();
|
||||||
|
|
||||||
}(typeof global == 'object' && global || this));
|
}(typeof global == 'object' && global || this));
|
||||||
|
|||||||
Reference in New Issue
Block a user