Skip to content

Instantly share code, notes, and snippets.

@jyotty
Last active March 7, 2016 20:54
Show Gist options
  • Save jyotty/49860a972bc05597e2b8 to your computer and use it in GitHub Desktop.
Save jyotty/49860a972bc05597e2b8 to your computer and use it in GitHub Desktop.
testing throughput of gem mirror
#!/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