Skip to content

Instantly share code, notes, and snippets.

@ursm
Last active December 14, 2015 10:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ursm/5074113 to your computer and use it in GitHub Desktop.
Save ursm/5074113 to your computer and use it in GitHub Desktop.
#!/bin/sh
for port in $(seq 3000 3003); do
echo $port
for c in 1 3 5 10 20; do
echo "Concurrency: ${c}"
for i in $(seq 1 3); do
ab -n 100 -c ${c} localhost:${port}/ 2> /dev/null | grep 'per second'
done
done
done
body = ['a' * 1024 * 512]
run ->(env) {
sleep 0.05 # simulate blocking I/O
[200, {}, body]
}
gem 'foreman'
gem 'puma'
gem 'rainbows'
gem 'sendfile'
gem 'sleepy_penguin'
gem 'thin'
gem 'unicorn'
GEM
remote: https://rubygems.org/
specs:
daemons (1.1.9)
eventmachine (1.0.1)
foreman (0.61.0)
thor (>= 0.13.6)
kgio (2.8.0)
puma (1.6.3)
rack (~> 1.2)
rack (1.5.2)
rainbows (4.5.0)
kgio (~> 2.5)
rack (~> 1.1)
unicorn (~> 4.6, >= 4.6.2)
raindrops (0.10.0)
sendfile (1.1.0)
sleepy_penguin (3.1.0)
thin (1.5.0)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.17.0)
unicorn (4.6.2)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
PLATFORMS
ruby
DEPENDENCIES
foreman
puma
rainbows
sendfile
sleepy_penguin
thin
unicorn
thin: bundle exec thin start -p 3000
unicorn: bundle exec unicorn -c unicorn.conf -p 3001
rainbows: bundle exec rainbows -c rainbows.conf -p 3002
puma: bundle exec puma -t 5:5 -p 3003
worker_processes 5
Rainbows! do
use :Epoll
end
worker_processes 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment