Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created May 18, 2010 21:46
Show Gist options
  • Select an option

  • Save reactormonk/405619 to your computer and use it in GitHub Desktop.

Select an option

Save reactormonk/405619 to your computer and use it in GitHub Desktop.
Concurrency Level: 10
Complete requests: 10000
Total transferred: 530000 bytes
HTML transferred: 130000 bytes
Requests per second: 3599.29 [#/sec] (mean)
Time per request: 2.778 [ms] (mean)
Time per request: 0.278 [ms] (mean, across all concurrent requests)
Transfer rate: 186.29 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 0 3 1.4 3 16
Waiting: 0 2 1.3 2 16
Total: 1 3 1.4 3 16
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 3
80% 3
90% 3
95% 3
98% 7
99% 11
100% 16 (longest request)
require 'rubygems'
require 'eventmachine'
require 'evma_httpserver'
class Handler < EventMachine::Connection
include EventMachine::HttpServer
def process_http_request
resp = EventMachine::DelegatedHttpResponse.new( self )
resp.status = 200
resp.content = "Hello World!\n"
resp.send_response
end
end
EventMachine::run {
EventMachine::start_server("0.0.0.0", 8080, Handler)
puts "Listening..."
}
Concurrency Level: 10
Time taken for tests: 3.599 seconds
Complete requests: 10000
Total transferred: 760000 bytes
HTML transferred: 120000 bytes
Requests per second: 2778.70 [#/sec] (mean)
Time per request: 3.599 [ms] (mean)
Time per request: 0.360 [ms] (mean, across all concurrent requests)
Transfer rate: 206.23 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 1 4 1.9 3 24
Waiting: 0 3 1.9 3 24
Total: 1 4 1.9 3 24
Percentage of the requests served within a certain time (ms)
50% 3
66% 4
75% 5
80% 5
90% 6
95% 6
98% 7
99% 7
100% 24 (longest request)
var sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(5000);
sys.puts('Server running at http://127.0.0.1:5000/');
app = proc do |env|
[200, { 'Content-Type' => 'text/plain' }, ['Hello World!\n']]
end
run app
Concurrency Level: 10
Time taken for tests: 17.015 seconds
Complete requests: 10000
Total transferred: 1310000 bytes
HTML transferred: 140000 bytes
Requests per second: 587.72 [#/sec] (mean)
Time per request: 17.015 [ms] (mean)
Time per request: 1.701 [ms] (mean, across all concurrent requests)
Transfer rate: 75.19 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 7
Processing: 1 17 9.4 13 63
Waiting: 0 17 9.4 13 63
Total: 2 17 9.4 13 63
Percentage of the requests served within a certain time (ms)
50% 13
66% 14
75% 15
80% 16
90% 24
95% 44
98% 47
99% 51
100% 63 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment