Skip to content

Commit

Permalink
Added simple thin benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 22, 2010
1 parent 23d09fc commit e05501a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
13 changes: 7 additions & 6 deletions benchmarks/run
@@ -1,12 +1,9 @@
#!/usr/bin/env bash

SLEEP=${SLEEP-2}
ABFLAGS=${ABFLAGS-"-n 5000 -c 50"}
ABFLAGS=${ABFLAGS-"-n 2000 -c 50"}
ADDR=${ADDR-http://127.0.0.1:3000/}
AB=${AB-ab}
RUBY=${RUBY-ruby}
NODE=${NODE-node}
PHP=${PHP-php}

log(){
echo "... $@"
Expand All @@ -18,7 +15,10 @@ bm(){
log benchmarking $type $file
case $type in
express)
$NODE benchmarks/express/$file &
node benchmarks/express/$file &
;;
thin)
thin -R benchmarks/thin/simple.ru -p 3000 start &
;;
esac
pid=$!
Expand All @@ -29,4 +29,5 @@ bm(){

log ab $ABFLAGS $ADDR
bm express simple.js
bm express static.js
bm express static.js
bm thin simple.ru
9 changes: 9 additions & 0 deletions benchmarks/thin/simple.ru
@@ -0,0 +1,9 @@

require 'rubygems'
require 'rack'

app = lambda do |env|
[200, { 'Content-Type' => 'text/plain' }, 'Hello World']
end

run app

0 comments on commit e05501a

Please sign in to comment.