Skip to content
Myr

Started benchmark script

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 135afb0 · Browse files · 5 files+94 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+94 added−2 removed

  • other:+94 added−2 removed

5 files+94 added−2 removed

added:benchmarks/express/simple.js+9 added
added:benchmarks/express/simple.js.out+44 added
1This is ApacheBench, Version 2.3 <$Revision: 655654 $>2Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/3Licensed to The Apache Software Foundation, http://www.apache.org/45Benchmarking 127.0.0.1 (be patient)678Server Software: 9Server Hostname: 127.0.0.110Server Port: 30001112Document Path: /13Document Length: 9 bytes1415Concurrency Level: 5016Time taken for tests: 1.475 seconds17Complete requests: 500018Failed requests: 019Write errors: 020Non-2xx responses: 500021Total transferred: 270000 bytes22HTML transferred: 45000 bytes23Requests per second: 3390.39 [#/sec] (mean)24Time per request: 14.748 [ms] (mean)25Time per request: 0.295 [ms] (mean, across all concurrent requests)26Transfer rate: 178.79 [Kbytes/sec] received2728Connection Times (ms)29 min mean[+/-sd] median max30Connect: 0 0 0.3 0 431Processing: 5 14 1.7 14 2532Waiting: 5 14 1.7 14 2533Total: 9 15 1.6 14 263435Percentage of the requests served within a certain time (ms)36 50% 1437 66% 1538 75% 1539 80% 1540 90% 1641 95% 1742 98% 2143 99% 2444 100% 26 (longest request)
added:benchmarks/run+33 added
1#!/usr/bin/env bash23SLEEP=${SLEEP-5}4ABFLAGS=${ABFLAGS-"-n 5000 -c 50"}5ADDR=${ADDR-http://127.0.0.1:3000/}6AB=${AB-ab}7RUBY=${RUBY-ruby}8NODE=${NODE-node}9PHP=${PHP-php}1011log(){12 echo "... $@"13}1415bm(){16 local type=$117 local file=$218 log benchmarking $type $file19 case $type in20 express)21 $NODE benchmarks/express/$file &22 ;;23 esac24 log $type $file started as process $!25 log allowing $SLEEP seconds to startup26 sleep $SLEEP27 log $AB $ABFLAGS $ADDR28 $AB $ABFLAGS -e benchmarks/$type/$file.csv $ADDR > benchmarks/$type/$file.out29 kill -KILL $!30}3132log ab $ABFLAGS $ADDR33bm express simple.js
modified:.gitignore+2 added-1 removed
1.DS_Store2*.seed3*.log3*.log4*.csv
modified:Makefile+6 added-1 removed
12AB = ab3ABFLAGS = -n 3000 -c 504NODE = node5COFFEE = coffee6PREFIX = /usr/local7
23 unmodified lines
31 @$(NODE) examples/coffee-upload/app.js32 33compile-coffee:34 @$(COFFEE) examples/coffee-upload/app.coffee33 3536benchmark: benchmarks/run37 @./benchmarks/run3839.PHONY: install test app