concurrent-benchmark

0.0.0-nightly.20220324 • Public • Published

Work In Progress...

concurrent-benchmark

test lint codeql report-card npm license

Benchmark scripts concurrently.

Description

Right now I am just playing around, but I am planning (maybe) to make something serious in the future.

concurrent-benchmark has the alias cb.

Install

$ yarn global add concurrent-benchmark

Usage

CLI

Let's take fixture.js as an example. It has a setTimeout that waits for 2 seconds.

$ time cb \
    'node fixture.js' \
    'node fixture.js' \
    'node fixture.js' \
    'node fixture.js'

So instead of taking using 1 thread (~8s) we are going to use 4 threads (~2s), one for each command. The output of this will get a few console.logs be something like:

real    0m2.289s
user    0m0.157s
sys     0m0.237s

Where real is the time it took to run the command.

Package

Not yet implemented.

import cb from 'concurrent-benchmark';

cb.run([
  {
    name: 'foo',
    script: 'echo foo',
  },
  {
    name: 'bar',
    script: 'echo bar',
  },
]);

Package Sidebar

Install

npm i concurrent-benchmark

Weekly Downloads

1

Version

0.0.0-nightly.20220324

License

MIT

Unpacked Size

2.07 MB

Total Files

4

Last publish

Collaborators

  • abranhe