-
-
Save kriszyp/434508 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 pinturaNodeApp = require("jsgi-node").Listener(pinturaApp); | |
run: () -> | |
http: require 'http' | |
server: http.createServer (request, response) -> | |
#sys.debug sys.inspect request | |
# separate handlers for high-load paths | |
if request.url is '/hello' | |
hello.call response | |
else if request.url is '/test' | |
redirector.call response, rnd() | |
else if request.url is '/install' | |
install.call response, rnd() | |
# delegate all the rest to pintura | |
else | |
pinturaNodeApp(request,response); | |
server.listen (settings.port or 80) | |
sys.puts 'Server running at http://127.0.0.1:' + (settings.port or 80) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requesting /hello from localhost via
ab -c500 -n30000 -r http://127.0.0.1:8080
:Raw javascript:
Requests per second: 3435.09 #/sec
Express:
Requests per second: 2163.50 #/sec
Pintura:
Requests per second: 1498.86 #/sec
Requests per second: 3238.66 #/sec