Skip to content

Instantly share code, notes, and snippets.

@hugs
Created February 15, 2010 03:15
Show Gist options
  • Select an option

  • Save hugs/304399 to your computer and use it in GitHub Desktop.

Select an option

Save hugs/304399 to your computer and use it in GitHub Desktop.
CoffeeScript + Node = Highly Caffeinated Web Server Scripting
# CoffeeScript + Node = Highly Caffeinated Web Server Scripting
# Code: http://gist.github.com/304374#file_webserver.coffee
#
# Measured on a MacBook Pro (OS X 10.5.8, 3.06 GHz Intel Core 2 Duo, 4 GB 1067 MHz DDR3)
hugs:~ hugs$ ab -n 1000 -c 10 http://127.0.0.1:8000/
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 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 8000
Document Path: /
Document Length: 13 bytes
Concurrency Level: 10
Time taken for tests: 0.145 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 77000 bytes
HTML transferred: 13000 bytes
Requests per second: 6907.70 [#/sec] (mean)
Time per request: 1.448 [ms] (mean)
Time per request: 0.145 [ms] (mean, across all concurrent requests)
Transfer rate: 519.43 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 2
Processing: 0 1 0.5 1 3
Waiting: 0 1 0.5 1 3
Total: 1 1 0.6 1 5
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 2
80% 2
90% 2
95% 2
98% 3
99% 4
100% 5 (longest request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment