Skip to content

Instantly share code, notes, and snippets.

@proudlygeek
Created March 27, 2012 07:33
Show Gist options
  • Select an option

  • Save proudlygeek/2213715 to your computer and use it in GitHub Desktop.

Select an option

Save proudlygeek/2213715 to your computer and use it in GitHub Desktop.
Benchmark Fun
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Hello World</h1>\n');
}).listen(8000, '127.0.0.1');
console.log('Server running at http://127.0.0.1:8000/');
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "<h1>Hello World!</h1>"
if __name__ == "__main__":
app.run()
require 'sinatra'
get '/' do
"<h1>Hello World!</h1>"
end
Flask 0.8
=========
```
Server Software: Werkzeug/0.8.3
Server Hostname: localhost
Server Port: 5000
Document Path: /
Document Length: 21 bytes
Concurrency Level: 100
Time taken for tests: 5.244 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 1750000 bytes
HTML transferred: 210000 bytes
Requests per second: 1906.84 [#/sec] (mean)
Time per request: 52.443 [ms] (mean)
Time per request: 0.524 [ms] (mean, across all concurrent requests)
Transfer rate: 325.88 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 3
Processing: 1 52 3.2 53 60
Waiting: 1 52 3.2 53 60
Total: 3 52 3.1 53 60
Percentage of the requests served within a certain time (ms)
50% 53
66% 53
75% 53
80% 54
90% 54
95% 54
98% 57
99% 58
100% 60 (longest request)
```
Sinatra 1.3.2 (Ruby 1.9.3)
==========================
```
Server Software: thin
Server Hostname: 127.0.0.1
Server Port: 4567
Document Path: /
Document Length: 21 bytes
Concurrency Level: 100
Time taken for tests: 5.240 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 2250000 bytes
HTML transferred: 210000 bytes
Requests per second: 1908.48 [#/sec] (mean)
Time per request: 52.398 [ms] (mean)
Time per request: 0.524 [ms] (mean, across all concurrent requests)
Transfer rate: 419.34 [Kbytes/sec] received
```
Node.js
=======
```
This is ApacheBench, Version 3.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Server Software:
Server Hostname: localhost
Server Port: 8000
Document Path: /
Document Length: 21 bytes
Concurrency Level: 100
Time taken for tests: 1.343 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 840000 bytes
HTML transferred: 210000 bytes
Requests per second: 7447.10 [#/sec] (mean)
Time per request: 13.428 [ms] (mean)
Time per request: 0.134 [ms] (mean, across all concurrent requests)
Transfer rate: 610.89 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 3 13 6.3 13 36
Waiting: 2 13 6.3 13 36
Total: 3 13 6.3 13 36
Percentage of the requests served within a certain time (ms)
50% 13
66% 16
75% 18
80% 19
90% 22
95% 23
98% 26
99% 29
100% 36 (longest request)
```
@liuggio
Copy link

liuggio commented Mar 27, 2012

geek!

@proudlygeek
Copy link
Author

Proudly! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment