NODE.JS计算一段程序执行时间

代码:
console.time('test')
var sum = 0
for (i = 0; i < 100000; i++) {
sum += i
}
console.log(sum)
console.timeEnd('test')

输出:
4999950000
test: 15.122ms
[Finished in 0.1s]

评论

this is is footer