0.0.1 • Published 4 years ago

@slashbin/slash.benchmark v0.0.1

Weekly downloads
1
License
GPL-3.0-or-later
Repository
github
Last release
4 years ago

🐋 Slash.benchmark

Slash.benchmark is a npm package that helps user easily show their processing times. Granularity is in ms.

  1. npm i slash.benchmark
  2. const Benchmark = require("./Benchmark");
  3. Benchmark.start();
  4. Optional items per seconds to count Benchmark.setItems(45);
  5. Benchmark.stop();
  6. console.log(Benchmark.getSeconds(), "seconds to run a command between start and stop")

    Easy as f👽k You're encouraed to contribute if you find a bug or something that can help => Issues.

    Donations => 0x3E7434A8c7eeAc9B2D197447b3f962296E259224

Example

const Benchmark = require("slash.benchmark");
Benchmark.start();
Benchmark.setItems(45);
setTimeout(()=>{
    Benchmark.stop();
    console.log(Benchmark.getSeconds(), "seconds to run a command between start and stop")
    console.log(Benchmark.getSpeed("s"), "items/sec have been processed")
    console.log(Benchmark.getSpeed("ms"), "items/ms have been processed")
}, 2000)

====== Slashbinslashnoname