@gatewayapps/nloop

1.1.0 • Public • Published

nloop

Usage: nloop -n [num] -m -- <command to execute>

Options:
  --help                      Show help                                [boolean]
  --version                   Show version number                      [boolean]
  -m, --Enable multi-thread                           [boolean] [default: false]
  -n, --Number of iterations                                          [required]

When multi-thread is enabled, it will create a process for each iteration immediately. Be careful with this option.

Example:

> nloop -n 5 -- echo "Hello, world!"
Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!

> nloop -n 5 -- ntimer -s -u milliseconds curl www.google.com
 curl www.google.com  completed in 172 milliseconds
 curl www.google.com  completed in 172 milliseconds
 curl www.google.com  completed in 181 milliseconds
 curl www.google.com  completed in 173 milliseconds
 curl www.google.com  completed in 168 milliseconds

/@gatewayapps/nloop/

    Package Sidebar

    Install

    npm i @gatewayapps/nloop

    Weekly Downloads

    0

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    12.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • danielgary
    • johnmurphy01
    • justinneff