master
1#!/bin/bash
2
3ENDPOINT="https://www.stronglifters.com/"
4REQUEST_COUNT="1000"
5THREAD_COUNT="10"
6FILENAME="$REQUEST_COUNT.$THREAD_COUNT.$(date +%s)"
7
8mkdir -p tmp/data
9ab -n $REQUEST_COUNT \
10 -c $THREAD_COUNT \
11 -g "tmp/data/$FILENAME.dat" \
12 -s 600 \
13 $ENDPOINT
14
15mkdir -p tmp/graphs
16gnuplot << EOF
17 # output as png image
18 set terminal png
19 set output "tmp/graphs/$FILENAME.png"
20 set title "$REQUEST_COUNT requests on $THREAD_COUNT thread(s)"
21 set size 1,0.7
22 set grid y
23 set xlabel "Request"
24 set ylabel "Total time (ms)"
25 plot "tmp/data/$FILENAME.dat" using 9 smooth frequency with lines title "frequency"
26EOF
27
28echo "\nResults are in tmp/graphs/$FILENAME.png\n"