Sha256: 5406a62462db1d551a2432501b8e970ca0c31317d33ded58e4d88d2c6507d446

Contents?: true

Size: 1.33 KB

Versions: 26

Compression:

Stored size: 1.33 KB

Contents

#!/usr/bin/env bash

COL=${COL-9}
ABFLAGS=$(cat results/flags)

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

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

#
# Output gnuplot script for line graph.
# 
# <title> <node> <connect>
#

function line() {
  cat <<-EOF
set terminal png
set output "results/graphs/$1.png"
set title "$1 $ABFLAGS"
set size 1,0.7
set grid y
set key left top
set xlabel "request"
set ylabel "response time (ms)"
plot "$2" using $COL smooth sbezier with lines title "node", \\
     "$3" using $COL smooth sbezier with lines title "connect", \\
     "$4" using $COL smooth sbezier with lines title "rack thin", \\
     "$5" using $COL smooth sbezier with lines title "sinatra thin"
EOF
}

#
# Output gnuplot script for bar graph.
# 
# <title> <node> <connect>
#

function bar() {
cat <<-EOF
set terminal png
set output "results/graphs/$1.rps.png"
set title "$1 $ABFLAGS"
set size 0.7,0.5
set grid y
set key left top
set ylabel "requests per second"
plot "$1.rps.dat" using 2: xtic(1) with histogram title ""
EOF
}

#
# Graph the output of the given <dir>.
# 
# <dir>
#

function graph(){
  log graphing $1
	local dir=results/benchmarks/$1
	line $1 \
	  $dir/node.js.dat \
	  $dir/connect.js.dat \
	  $dir/rack.thin.ru.dat \
	  $dir/sinatra.thin.ru.dat \
	  > results/$1.p
	gnuplot results/$1.p
}

# Make ./results/graphs
mkdir -p results/graphs

graph hello-world
graph static

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
vulcan-0.8.2 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.8.1 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.8.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.7.2 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.7.1 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.7.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.6.1 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.6.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.5.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.4.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.3.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.2.5 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.2.4 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.2.3 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.2.2 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.2.1 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.2.0 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.1.6 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.1.5 server/node_modules/connect-form/support/connect/benchmarks/graph
vulcan-0.1.4 server/node_modules/connect-form/support/connect/benchmarks/graph