From d0c238cc81a7bc4d67453ae2952d7d9368069f89 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 20 Dec 2014 00:03:10 +0100 Subject: 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 --- benchmark/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmark') 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); }; -- cgit v1.2.1