benchmark.js 308 字节
Newer Older
Lab机器人's avatar
readme  
Lab机器人 已提交
1 2 3 4 5 6 7 8 9 10 11 12
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);