benchmarkify
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"Date performance": [ | ||
{ | ||
"name": "Call Date.now", | ||
"count": 1099.265844937106 | ||
}, | ||
{ | ||
"name": "Call process.hrtime", | ||
"count": 2128.5539100242263 | ||
} | ||
], | ||
"Increment integer": [ | ||
{ | ||
"name": "Increment with ++", | ||
"count": 71193180.92691727 | ||
}, | ||
{ | ||
"name": "Increment with +=", | ||
"count": 63623036.63459145 | ||
}, | ||
{ | ||
"name": "Increment with = i + 1", | ||
"count": 72415170.0881232 | ||
} | ||
], | ||
"timestamp": 1491380204855, | ||
"generated": "Wed Apr 05 2017 10:16:44 GMT+0200 (Közép-európai nyári idő )" | ||
"suites": { | ||
"Date performance": [ | ||
{ | ||
"name": "Call Date.now", | ||
"count": 1117.072219061476 | ||
}, | ||
{ | ||
"name": "Call process.hrtime", | ||
"count": 2105.384657722671 | ||
} | ||
], | ||
"Increment integer": [ | ||
{ | ||
"name": "Increment with ++", | ||
"count": 71312828.43424784 | ||
}, | ||
{ | ||
"name": "Increment with +=", | ||
"count": 64542354.18162208 | ||
}, | ||
{ | ||
"name": "Increment with = i + 1", | ||
"count": 71180902.65344249 | ||
} | ||
] | ||
}, | ||
"timestamp": 1491395464173, | ||
"generated": "Wed Apr 05 2017 14:31:04 GMT+0200 (Közép-európai nyári idő )" | ||
} |
{ | ||
"String concatenate": [ | ||
{ | ||
"name": "Concat with '+'", | ||
"timestamp": 1491379942740, | ||
"generated": "Wed Apr 05 2017 10:12:22 GMT+0200 (Közép-európai nyári idő )", | ||
"count": 30293.77052647164 | ||
}, | ||
{ | ||
"name": "Concat with array & join", | ||
"timestamp": 1491379942759, | ||
"generated": "Wed Apr 05 2017 10:12:22 GMT+0200 (Közép-európai nyári idő )", | ||
"count": 17438.451480537886 | ||
} | ||
] | ||
"suites": { | ||
"String concatenate": [ | ||
{ | ||
"name": "Concat with '+'", | ||
"count": 30115.906356000294 | ||
}, | ||
{ | ||
"name": "Concat with array & join", | ||
"count": 17910.26250720926 | ||
} | ||
] | ||
}, | ||
"timestamp": 1491395425250, | ||
"generated": "Wed Apr 05 2017 14:30:25 GMT+0200 (Közép-európai nyári idő )" | ||
} |
10
index.js
@@ -107,6 +107,8 @@ const _ = require("lodash"); | ||
mkdir.sync(path.dirname(path.resolve(self.opts.resultFile))); | ||
let content = {}; | ||
let content = { | ||
suites: {} | ||
}; | ||
if (fs.existsSync(self.opts.resultFile)) { | ||
try { | ||
content = JSON.parse(fs.readFileSync(self.opts.resultFile)); | ||
content = JSON.parse(fs.readFileSync(self.opts.resultFile), 'utf8'); | ||
} catch(e) { | ||
@@ -117,3 +119,3 @@ // Ignored | ||
content[self.opts.name] = tests.map(bench => ({ | ||
content.suites[self.opts.name] = tests.map(bench => ({ | ||
name: bench.name, | ||
@@ -126,3 +128,3 @@ count: bench.hz | ||
fs.writeFileSync(self.opts.resultFile, JSON.stringify(content, null, 2)); | ||
fs.writeFileSync(self.opts.resultFile, JSON.stringify(content, null, 2), 'utf8'); | ||
} | ||
@@ -129,0 +131,0 @@ |
{ | ||
"name": "benchmarkify", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Benchmark runner for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13305
256