Skip to content

Instantly share code, notes, and snippets.

@ninjudd
Created October 21, 2011 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninjudd/1305029 to your computer and use it in GitHub Desktop.
Save ninjudd/1305029 to your computer and use it in GitHub Desktop.
[8080,8083,8084].each do |port|
puts ab = "ab -c50 -n10000 http://fallout:#{port}/"
header = `#{ab} | tail -n9`.split("\n").collect do |line|
print sprintf("%6s", line.split[0])
end
puts
5.times.collect do |i|
`#{ab} | tail -n9`.split("\n").collect do |line|
print sprintf("%6s", line.split[1])
end
puts
end
end

First Run

Ruby 1.9.2

ab -c50 -n10000 http://localhost:8080/ 2>/dev/null
   50%   66%   75%   80%   90%   95%   98%   99%  100%
     2     2     2     2     5     5     5     7     8
     2     2     2     2     5     5     5     5     7
     2     2     2     3     5     5     5     5     8
     2     2     2     2     5     5     5     7     8
     2     2     2     2     5     5     5     5     8

Clojure (Aleph/Netty)

ab -c50 -n10000 http://localhost:8083/ 2>/dev/null
   50%   66%   75%   80%   90%   95%   98%   99%  100%
     8     9    10    10    11    12    14    25    28
     6     7     7     7     7     7     9    20    26
     7     7     7     7     7     8     9    22    26
     7     7     7     7     8     8     8    21    31
     7     7     7     7     7     8     8    23    28

Clojure (Ring/Jetty)

ab -c50 -n10000 http://localhost:8084/ 2>/dev/null
   50%   66%   75%   80%   90%   95%   98%   99%  100%
     4     5     5     5     6     7     9    10    23
     3     3     3     4     4     4     5     7    18
     4     4     4     4     5     5     5     6    26
     3     3     3     3     4     4     4     5    18
     3     4     4     4     4     5     5     5     8

Second Run

Ruby 1.9.2

ab -c50 -n10000 http://localhost:8080/ 2>/dev/null
   50%   66%   75%   80%   90%   95%   98%   99%  100%
     2     2     3     3     5     5     6     6     7
     2     2     2     2     5     5     5     5     6
     2     2     2     2     5     5     5     5     5
     2     2     3     3     5     6     6     6     8
     2     2     2     2     5     5     5     6     7

Clojure (Aleph/Netty)

ab -c50 -n10000 http://localhost:8083/ 2>/dev/null
   50%   66%   75%   80%   90%   95%   98%   99%  100%
     7     7     7     7     8     8     8    21    30
     7     7     7     7     8     8     9    22    31
     7     7     7     7     7     8    10    22    29
     7     7     7     7     8     8     9    22    34
     7     7     7     7     8     8     9    19    33

Clojure (Ring/Jetty)

ab -c50 -n10000 http://localhost:8084/ 2>/dev/null
   50%   66%   75%   80%   90%   95%   98%   99%  100%
     3     4     4     4     4     4     5     5     8
     3     3     4     4     4     4     4     4     5
     3     4     4     4     4     4     4     6    28
     3     3     3     3     3     3     4     4     8
     3     4     4     4     4     4     4     5     9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment