diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-20 00:03:10 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-12-20 02:38:47 +0100 |
commit | d0c238cc81a7bc4d67453ae2952d7d9368069f89 (patch) | |
tree | f05e1ef358cc20e9262d5771fda9ae1959740b06 /benchmark | |
parent | 1a63b45a2a32b3df60118518bf22171b81b89ba9 (diff) | |
download | node-new-d0c238cc81a7bc4d67453ae2952d7d9368069f89.tar.gz |
benchmark: fix printing of large numbers
Don't use Number#toPrecision(), it switches to scientific notation for
numbers with more digits than the precision; use Number#toFixed().
PR-URL: https://github.com/iojs/io.js/pull/185
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/common.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/common.js b/benchmark/common.js index ff54f2ea49..7d1730c373 100644 --- a/benchmark/common.js +++ b/benchmark/common.js @@ -187,7 +187,7 @@ Benchmark.prototype.end = function(operations) { Benchmark.prototype.report = function(value) { var heading = this.getHeading(); if (!silent) - console.log('%s: %s', heading, value.toPrecision(5)); + console.log('%s: %s', heading, value.toFixed(0)); process.exit(0); }; |