Skip to content
Myr

Added simple thin benchmark

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

authored by visionmedia · committed by visionmedia · parent 23d09fc · Browse files · 2 files+16 added−6 removed
This commit

State

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

Diff stats

2 files+16 added−6 removed

  • other:+16 added−6 removed

2 files+16 added−6 removed

added:benchmarks/thin/simple.ru+9 added
12require 'rubygems'3require 'rack'45app = lambda do |env|6 [200, { 'Content-Type' => 'text/plain' }, 'Hello World']7end89run app
modified:benchmarks/run+7 added-6 removed
1#!/usr/bin/env bash23SLEEP=${SLEEP-2}4ABFLAGS=${ABFLAGS-"-n 5000 -c 50"}4ABFLAGS=${ABFLAGS-"-n 2000 -c 50"}5ADDR=${ADDR-http://127.0.0.1:3000/}6AB=${AB-ab}7RUBY=${RUBY-ruby}8NODE=${NODE-node}9PHP=${PHP-php}78log(){9 echo "... $@"10}
3 unmodified lines
14 local file=$215 log benchmarking $type $file16 case $type in17 express)21 $NODE benchmarks/express/$file &18 node benchmarks/express/$file &19 ;;20 thin)21 thin -R benchmarks/thin/simple.ru -p 3000 start &22 ;;23 esac24 pid=$!25 sleep $SLEEP26 $AB $ABFLAGS -e benchmarks/$type/$file.csv $ADDR > benchmarks/$type/$file.out
1 unmodified line
28}2930log ab $ABFLAGS $ADDR31bm express simple.js32bm express static.js32bm express static.js33bm thin simple.ru