npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

in-parallel-lit

v2.0.0

Published

Run multiple processes in parallel

Downloads

3

Readme

in-parallel-lit

A CLI tool to run multiple processes in parallel.

Installation

$ npm i -g in-parallel-lit

Usage

$ in-parallel "ping google.com -c 3" "ping 127.0.0.1 -c 3"

# Prints:
# -------
# [ping 127.0.0.1 -c 3] PING 127.0.0.1 (127.0.0.1): 56 data bytes
# [ping 127.0.0.1 -c 3] 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.044 ms
# [ping google.com -c 3] PING google.com (142.250.181.238): 56 data bytes
# [ping google.com -c 3] 64 bytes from 142.250.181.238: icmp_seq=0 ttl=56 time=30.401 ms
# [ping 127.0.0.1 -c 3] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.037 ms
# [ping google.com -c 3] 64 bytes from 142.250.181.238: icmp_seq=1 ttl=56 time=50.207 ms
# [ping 127.0.0.1 -c 3] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.188 ms
# [ping 127.0.0.1 -c 3] 
# [ping 127.0.0.1 -c 3] --- 127.0.0.1 ping statistics ---
# [ping 127.0.0.1 -c 3] 3 packets transmitted, 3 packets received, 0.0% packet loss
# [ping 127.0.0.1 -c 3] round-trip min/avg/max/stddev = 0.037/0.090/0.188/0.070 ms
# [ping google.com -c 3] 64 bytes from 142.250.181.238: icmp_seq=2 ttl=56 time=29.115 ms
# [ping google.com -c 3] 
# [ping google.com -c 3] --- google.com ping statistics ---
# [ping google.com -c 3] 3 packets transmitted, 3 packets received, 0.0% packet loss
# [ping google.com -c 3] round-trip min/avg/max/stddev = 29.115/36.574/50.207/9.654 ms

Options

-n, --names

List of custom names to be used in prefix template.

$ in-parallel -n "google,localhost" "ping google.com -c 2" "ping 127.0.0.1 -c 2"

# Prints:
# -------
# [localhost] PING 127.0.0.1 (127.0.0.1): 56 data bytes
# [localhost] 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.051 ms
# [google] PING google.com (142.250.186.46): 56 data bytes
# [google] 64 bytes from 142.250.186.46: icmp_seq=0 ttl=56 time=18.726 ms
# [localhost] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.205 ms
# [localhost] 
# [localhost] --- 127.0.0.1 ping statistics ---
# [localhost] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [localhost] round-trip min/avg/max/stddev = 0.051/0.128/0.205/0.077 ms
# [google] 64 bytes from 142.250.186.46: icmp_seq=1 ttl=56 time=18.386 ms
# [google] 
# [google] --- google.com ping statistics ---
# [google] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [google] round-trip min/avg/max/stddev = 18.386/18.556/18.726/0.170 ms

-c, --continue-on-error

Set the flag to continue executing other/subsequent tasks even if a task threw an error. in-parallel itself will exit with non-zero code if one or more tasks threw error(s).

$ in-parallel -c "<command that fails>" "ping 127.0.0.1 -c 2"

# Prints:
# -------
# [ping 127.0.0.1 -c 2] PING 127.0.0.1 (127.0.0.1): 56 data bytes
# [ping 127.0.0.1 -c 2] 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.054 ms
# [ping 127.0.0.1 -c 2] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.201 ms
# [ping 127.0.0.1 -c 2] 
# [ping 127.0.0.1 -c 2] --- 127.0.0.1 ping statistics ---
# [ping 127.0.0.1 -c 2] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [ping 127.0.0.1 -c 2] round-trip min/avg/max/stddev = 0.054/0.128/0.201/0.074 ms

--max-parallel

Set the maximum number of parallelism. Default is unlimited (0).

$ in-parallel --max-parallel 1 "ping google.com -c 2" "ping 127.0.0.1 -c 2"

# Prints:
# -------
# [ping google.com -c 2] PING google.com (142.250.186.46): 56 data bytes
# [ping google.com -c 2] 64 bytes from 142.250.186.46: icmp_seq=0 ttl=56 time=19.455 ms
# [ping google.com -c 2] 64 bytes from 142.250.186.46: icmp_seq=1 ttl=56 time=18.799 ms
# [ping google.com -c 2] 
# [ping google.com -c 2] --- google.com ping statistics ---
# [ping google.com -c 2] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [ping google.com -c 2] round-trip min/avg/max/stddev = 18.799/19.127/19.455/0.328 ms
# [ping 127.0.0.1 -c 2] PING 127.0.0.1 (127.0.0.1): 56 data bytes
# [ping 127.0.0.1 -c 2] 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.050 ms
# [ping 127.0.0.1 -c 2] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.120 ms
# [ping 127.0.0.1 -c 2] 
# [ping 127.0.0.1 -c 2] --- 127.0.0.1 ping statistics ---
# [ping 127.0.0.1 -c 2] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [ping 127.0.0.1 -c 2] round-trip min/avg/max/stddev = 0.050/0.085/0.120/0.035 ms

--aggregate-output

Avoid interleaving output by delaying printing of each command's output until it has finished.

$ in-parallel --aggregate-output "ping google.com -c 2" "ping 127.0.0.1 -c 2"

# Prints:
# -------
# [ping 127.0.0.1 -c 2] PING 127.0.0.1 (127.0.0.1): 56 data bytes
# [ping 127.0.0.1 -c 2] 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.052 ms
# [ping 127.0.0.1 -c 2] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.076 ms
# [ping 127.0.0.1 -c 2] 
# [ping 127.0.0.1 -c 2] --- 127.0.0.1 ping statistics ---
# [ping 127.0.0.1 -c 2] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [ping 127.0.0.1 -c 2] round-trip min/avg/max/stddev = 0.052/0.064/0.076/0.012 ms
# [ping google.com -c 2] PING google.com (142.250.186.46): 56 data bytes
# [ping google.com -c 2] 64 bytes from 142.250.186.46: icmp_seq=0 ttl=56 time=18.493 ms
# [ping google.com -c 2] 64 bytes from 142.250.186.46: icmp_seq=1 ttl=56 time=18.072 ms
# [ping google.com -c 2] 
# [ping google.com -c 2] --- google.com ping statistics ---
# [ping google.com -c 2] 2 packets transmitted, 2 packets received, 0.0% packet loss
# [ping google.com -c 2] round-trip min/avg/max/stddev = 18.072/18.282/18.493/0.211 ms

Development

(1) Install dependencies

$ npm i
# or
$ yarn

(2) Run initial validation

$ ./Taskfile.sh validate

(3) Start developing. See ./Taskfile.sh for more tasks to help you develop.