linx-simulator2/node_modules/toml/benchmark.js

13 lines
308 B
JavaScript
Raw Normal View History

2019-09-18 08:11:16 +00:00
var toml = require('./index');
var fs = require('fs');
var data = fs.readFileSync('./test/example.toml', 'utf8');
var iterations = 1000;
var start = new Date();
for(var i = 0; i < iterations; i++) {
toml.parse(data);
}
var end = new Date();
console.log("%s iterations in %sms", iterations, end - start);