site/node_modules/toml/benchmark.js

13 lines
308 B
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +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);