This gist just keeps the data for this article: Async frameworks "Hello World" showdown.
Created
May 12, 2012 13:54
-
-
Save SaltwaterC/2666633 to your computer and use it in GitHub Desktop.
Async frameworks "Hello World" showdown
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
local http = require('luanode.http') | |
http.createServer(function(self, request, response) | |
response:writeHead(200, {["Content-Type"] = "text/plain"}) | |
response:finish("Hello World") | |
end):listen(3003) | |
process:loop() |
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
local HTTP = require("http") | |
HTTP.createServer(function (req, res) | |
local body = "Hello World!" | |
res:writeHead(200, { | |
["Content-Type"] = "text/plain", | |
["Content-Length"] = #body | |
}) | |
res:finish(body) | |
end):listen(3004) |
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
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World!'); | |
}).listen(3000, 'localhost'); |
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
<?php | |
require 'vendor/autoload.php'; | |
$stack = new React\Espresso\Stack(function ($request, $response) { | |
$response->writeHead(200, array('Content-Type' => 'text/plain')); | |
$response->end("Hello World!"); | |
}); | |
$stack->listen(3005); |
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
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:3000/ | |
This is ApacheBench, Version 2.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 127.0.0.1 (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests | |
Completed 500000 requests | |
Completed 600000 requests | |
Completed 700000 requests | |
Completed 800000 requests | |
Completed 900000 requests | |
Completed 1000000 requests | |
Finished 1000000 requests | |
Server Software: | |
Server Hostname: 127.0.0.1 | |
Server Port: 3000 | |
Document Path: / | |
Document Length: 12 bytes | |
Concurrency Level: 1000 | |
Time taken for tests: 107.435 seconds | |
Complete requests: 1000000 | |
Failed requests: 0 | |
Write errors: 0 | |
Keep-Alive requests: 0 | |
Total transferred: 76000000 bytes | |
HTML transferred: 12000000 bytes | |
Requests per second: 9307.96 [#/sec] (mean) | |
Time per request: 107.435 [ms] (mean) | |
Time per request: 0.107 [ms] (mean, across all concurrent requests) | |
Transfer rate: 690.83 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 90 386.9 0 7033 | |
Processing: 0 16 36.9 13 2380 | |
Waiting: 0 16 36.8 13 2380 | |
Total: 1 106 394.5 15 7722 | |
Percentage of the requests served within a certain time (ms) | |
50% 15 | |
66% 18 | |
75% 21 | |
80% 23 | |
90% 38 | |
95% 1010 | |
98% 1025 | |
99% 1227 | |
100% 7722 (longest request) | |
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:3002/ | |
This is ApacheBench, Version 2.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 127.0.0.1 (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests | |
Completed 500000 requests | |
Completed 600000 requests | |
Completed 700000 requests | |
Completed 800000 requests | |
Completed 900000 requests | |
Completed 1000000 requests | |
Finished 1000000 requests | |
Server Software: | |
Server Hostname: 127.0.0.1 | |
Server Port: 3002 | |
Document Path: / | |
Document Length: 12 bytes | |
Concurrency Level: 1000 | |
Time taken for tests: 40.028 seconds | |
Complete requests: 1000000 | |
Failed requests: 0 | |
Write errors: 0 | |
Keep-Alive requests: 1000000 | |
Total transferred: 101000000 bytes | |
HTML transferred: 12000000 bytes | |
Requests per second: 24982.31 [#/sec] (mean) | |
Time per request: 40.028 [ms] (mean) | |
Time per request: 0.040 [ms] (mean, across all concurrent requests) | |
Transfer rate: 2464.08 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 1 43.8 0 3007 | |
Processing: 4 39 8.6 38 725 | |
Waiting: 4 39 8.6 38 725 | |
Total: 4 40 46.0 38 3116 | |
Percentage of the requests served within a certain time (ms) | |
50% 38 | |
66% 39 | |
75% 39 | |
80% 40 | |
90% 47 | |
95% 51 | |
98% 56 | |
99% 62 | |
100% 3116 (longest request) | |
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:3003/ | |
This is ApacheBench, Version 2.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 127.0.0.1 (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests | |
Completed 500000 requests | |
Completed 600000 requests | |
Completed 700000 requests | |
Completed 800000 requests | |
Completed 900000 requests | |
Completed 1000000 requests | |
Finished 1000000 requests | |
Server Software: | |
Server Hostname: 127.0.0.1 | |
Server Port: 3003 | |
Document Path: / | |
Document Length: 11 bytes | |
Concurrency Level: 1000 | |
Time taken for tests: 243.269 seconds | |
Complete requests: 1000000 | |
Failed requests: 8906 | |
(Connect: 0, Receive: 2968, Length: 2968, Exceptions: 2970) | |
Write errors: 0 | |
Keep-Alive requests: 0 | |
Total transferred: 111667584 bytes | |
HTML transferred: 10967352 bytes | |
Requests per second: 4110.67 [#/sec] (mean) | |
Time per request: 243.269 [ms] (mean) | |
Time per request: 0.243 [ms] (mean, across all concurrent requests) | |
Transfer rate: 448.27 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 80 841.7 0 31084 | |
Processing: 4 149 2414.8 29 227322 | |
Waiting: 0 69 747.7 29 113431 | |
Total: 12 230 2650.2 30 230324 | |
Percentage of the requests served within a certain time (ms) | |
50% 30 | |
66% 31 | |
75% 32 | |
80% 32 | |
90% 42 | |
95% 54 | |
98% 1032 | |
99% 3855 | |
100% 230324 (longest request) | |
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:3004/ | |
This is ApacheBench, Version 2.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 127.0.0.1 (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests | |
Completed 500000 requests | |
Completed 600000 requests | |
Completed 700000 requests | |
Completed 800000 requests | |
Completed 900000 requests | |
Completed 1000000 requests | |
Finished 1000000 requests | |
Server Software: Luvit | |
Server Hostname: 127.0.0.1 | |
Server Port: 3004 | |
Document Path: / | |
Document Length: 12 bytes | |
Concurrency Level: 1000 | |
Time taken for tests: 60.965 seconds | |
Complete requests: 1000000 | |
Failed requests: 0 | |
Write errors: 0 | |
Keep-Alive requests: 1000000 | |
Total transferred: 153000000 bytes | |
HTML transferred: 12000000 bytes | |
Requests per second: 16402.80 [#/sec] (mean) | |
Time per request: 60.965 [ms] (mean) | |
Time per request: 0.061 [ms] (mean, across all concurrent requests) | |
Transfer rate: 2450.81 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 0 26.5 0 3001 | |
Processing: 5 60 16.0 56 168 | |
Waiting: 0 22 15.7 18 95 | |
Total: 33 61 30.5 56 3045 | |
Percentage of the requests served within a certain time (ms) | |
50% 56 | |
66% 64 | |
75% 71 | |
80% 76 | |
90% 84 | |
95% 92 | |
98% 97 | |
99% 101 | |
100% 3045 (longest request) | |
PHP 5.3.10 from the Ubuntu 12.04 repository | |
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:3005/ | |
This is ApacheBench, Version 2.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 127.0.0.1 (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests | |
Completed 500000 requests | |
Completed 600000 requests | |
Completed 700000 requests | |
Completed 800000 requests | |
Completed 900000 requests | |
Completed 1000000 requests | |
Finished 1000000 requests | |
Server Software: | |
Server Hostname: 127.0.0.1 | |
Server Port: 3005 | |
Document Path: / | |
Document Length: 12 bytes | |
Concurrency Level: 1000 | |
Time taken for tests: 635.568 seconds | |
Complete requests: 1000000 | |
Failed requests: 9766 | |
(Connect: 0, Receive: 3255, Length: 3255, Exceptions: 3256) | |
Write errors: 0 | |
Keep-Alive requests: 0 | |
Total transferred: 83726580 bytes | |
HTML transferred: 11960940 bytes | |
Requests per second: 1573.40 [#/sec] (mean) | |
Time per request: 635.568 [ms] (mean) | |
Time per request: 0.636 [ms] (mean, across all concurrent requests) | |
Transfer rate: 128.65 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 113 1094.3 0 31099 | |
Processing: 2 446 8553.0 21 346026 | |
Waiting: 0 118 2438.8 21 225645 | |
Total: 3 559 8739.7 21 347032 | |
Percentage of the requests served within a certain time (ms) | |
50% 21 | |
66% 24 | |
75% 25 | |
80% 26 | |
90% 29 | |
95% 39 | |
98% 1042 | |
99% 7032 | |
100% 347032 (longest request) | |
PHP 5.4.3, built with ./configure --disable-debug --enable-inline-optimization --with-layout=GNU --disable-cgi --with-curl --enable-sockets && make -j 2 | |
ab -r -k -n 1000000 -c 1000 http://127.0.0.1:3005/ | |
This is ApacheBench, Version 2.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 127.0.0.1 (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests | |
Completed 500000 requests | |
Completed 600000 requests | |
Completed 700000 requests | |
Completed 800000 requests | |
Completed 900000 requests | |
Completed 1000000 requests | |
Finished 1000000 requests | |
Server Software: | |
Server Hostname: 127.0.0.1 | |
Server Port: 3005 | |
Document Path: / | |
Document Length: 12 bytes | |
Concurrency Level: 1000 | |
Time taken for tests: 268.277 seconds | |
Complete requests: 1000000 | |
Failed requests: 4473 | |
(Connect: 0, Receive: 1491, Length: 1491, Exceptions: 1491) | |
Write errors: 0 | |
Keep-Alive requests: 0 | |
Total transferred: 83874756 bytes | |
HTML transferred: 11982108 bytes | |
Requests per second: 3727.49 [#/sec] (mean) | |
Time per request: 268.277 [ms] (mean) | |
Time per request: 0.268 [ms] (mean, across all concurrent requests) | |
Transfer rate: 305.31 [Kbytes/sec] received | |
Connection Times (ms) | |
min mean[+/-sd] median max | |
Connect: 0 60 835.4 0 31080 | |
Processing: 4 139 3667.9 8 267220 | |
Waiting: 0 41 1097.2 8 165714 | |
Total: 6 199 3821.4 9 268219 | |
Percentage of the requests served within a certain time (ms) | |
50% 9 | |
66% 9 | |
75% 11 | |
80% 11 | |
90% 11 | |
95% 11 | |
98% 12 | |
99% 2309 | |
100% 268219 (longest request) |
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
load('vertx.js'); | |
vertx.createHttpServer().requestHandler(function(req) { | |
req.response.putHeader('content-type', 'text/plain'); | |
req.response.end('Hello World!'); | |
}).listen(3002, 'localhost'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment