summaryrefslogtreecommitdiff
path: root/benchmark/common.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-12-20 00:03:10 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2014-12-20 02:38:47 +0100
commitd0c238cc81a7bc4d67453ae2952d7d9368069f89 (patch)
treef05e1ef358cc20e9262d5771fda9ae1959740b06 /benchmark/common.js
parent1a63b45a2a32b3df60118518bf22171b81b89ba9 (diff)
downloadandroid-node-v8-d0c238cc81a7bc4d67453ae2952d7d9368069f89.tar.gz
android-node-v8-d0c238cc81a7bc4d67453ae2952d7d9368069f89.tar.bz2
android-node-v8-d0c238cc81a7bc4d67453ae2952d7d9368069f89.zip
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/common.js')
-rw-r--r--benchmark/common.js2
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);
};