Last active
March 7, 2016 20:54
-
-
Save jyotty/49860a972bc05597e2b8 to your computer and use it in GitHub Desktop.
testing throughput of gem mirror
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
[ -n "$DEBUG" ] && set -x | |
jobs="${1:-8}" | |
pids=() | |
for i in $(seq "$jobs"); do | |
( | |
GEM_HOME="$(mktemp -d)" | |
export GEM_HOME | |
gem install $YOUR_GEMS | |
rm -rf "$GEM_HOME" | |
)& | |
pids+=("$!") | |
done | |
for pid in "${pids[@]}"; do | |
wait $pid | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment