smart-perf

A performace test library

Usage no npm install needed!

<script type="module">
  import smartPerf from 'https://cdn.skypack.dev/smart-perf';
</script>

README

  • npm install -g smart-perf
var smartPerf = require("smart-perf");
smartPerf.start("Linear search");
run_linear_search();
smartPerf.end(false);

smartPerf.start("Binary search");
run_binary_search();
smartPerf.end(false);

smartPerf.print();

The sample result:

Key            CPU(ms)
-------------  -------
Linear search  207 ms
Binary search  129 ms