Last active
December 14, 2015 10:39
-
-
Save ursm/5074113 to your computer and use it in GitHub Desktop.
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
#!/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 |
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
body = ['a' * 1024 * 512] | |
run ->(env) { | |
sleep 0.05 # simulate blocking I/O | |
[200, {}, body] | |
} |
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
gem 'foreman' | |
gem 'puma' | |
gem 'rainbows' | |
gem 'sendfile' | |
gem 'sleepy_penguin' | |
gem 'thin' | |
gem 'unicorn' |
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
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 |
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
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 |
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
worker_processes 5 | |
Rainbows! do | |
use :Epoll | |
end |
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
worker_processes 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment