logicalparadox / matcha

A caffeine driven, simplistic approach to benchmarking.
563 stars 37 forks source link

Use `process.cpuUsage()` instead of `process.hrtime()` #34

Closed zhujinxuan closed 5 years ago

zhujinxuan commented 6 years ago

In benchmarking, the real world time is not suggested because the real world running time of a function is influenced by other running programs (like browsers, slates, Mail...). This PR use process.cpuUsage, counting only the cpu usage time and excluding the idling time.