Sha256: 699a8f94ca8b7fd721dfe68ec25d0aaa325ef3639a51a94c84dd36682926c5e9

Contents?: true

Size: 940 Bytes

Versions: 26

Compression:

Stored size: 940 Bytes

Contents

#!/usr/bin/env bash

ABFLAGS=${ABFLAGS-"-n 2000 -c 50 -k"}
ADDR=${ADDR-http://0.0.0.0:3000/}
AB=${AB-ab}

#
# Log <msg ...>
# 
# <msg ...>
#

log(){
  echo "... $@"
}

#
# Benchmark the given <dir> and [path].
# 
# <dir> [path]
#

bm(){
  local dir=$1;
  local path=${2-/};
  for file in benchmarks/$dir/*; do
  	log running $file
  	case $file in
  		*.js)
  		  node $file &
  		  sleep 2
  		  ;;
  		*.thin.ru)
  		  thin -R $file -p 3000 start &
  		  sleep 2
  		  ;;
  		*.mongrel.ru)
  		  rackup $file -p 3000 -s mongrel &
  		  sleep 2
  		  ;;
  	esac
  	local pid=$!
  	local dirname=results/$(dirname $file)
  	mkdir -p $dirname
  	$AB $ABFLAGS -g results/$file.dat $ADDR/$path > results/$file.out
  	log $(cat results/$file.out | grep Requests)
  	kill -9 $pid
  done
}

# Make ./results
mkdir -p results

# Store flags
echo $ABFLAGS > results/flags

# Run benchmarks
log $AB $ABFLAGS $ADDR
bm hello-world
bm static /jquery.js

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
vulcan-0.1.3 server/node_modules/connect-form/support/connect/benchmarks/run
vulcan-0.1.2 server/node_modules/connect-form/support/connect/benchmarks/run
vulcan-0.1.1 server/node_modules/connect-form/support/connect/benchmarks/run
vulcan-0.1.0 server/node_modules/connect-form/support/connect/benchmarks/run
vulcan-0.0.3 server/node_modules/connect-form/support/connect/benchmarks/run
vulcan-0.0.2 server/node_modules/connect-form/support/connect/benchmarks/run