Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62604177
benchmark_http.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, May 14, 07:10
Size
723 B
Mime Type
text/x-shellscript
Expires
Thu, May 16, 07:10 (2 d)
Engine
blob
Format
Raw Data
Handle
17616686
Attached To
rPHINFRA c4science
benchmark_http.sh
View Options
#!/bin/bash
if [[ $1 == '' ]]; then
echo "USAGE: $0 <cookie phsid>"
exit
fi
URL='https://c4science.ch/diffusion/TEST/repository/master/'
COOK="-C phsid:$1 -C phusr:admin"
ARGS1='-n 1000 -c 20'
ARGS2='-n 1000 -c 2'
DATE=$(date +%s)
ab -g /tmp/gnuplot1.out $COOK $ARGS1 $URL
ab -g /tmp/gnuplot2.out $COOK $ARGS2 $URL
echo "set terminal png
set output 'benchmark_$DATE.png'
set title 'Apache Benchmark $(date +"%d.%m.%Y %H:%M")'
set size 1,1
set grid y
set xlabel 'request'
set ylabel 'response time (ms)'
plot '/tmp/gnuplot1.out' using 9 smooth sbezier with lines title '$ARGS1' \\
, '/tmp/gnuplot2.out' using 9 smooth sbezier with lines title '$ARGS2'" > /tmp/plotme
gnuplot /tmp/plotme
eog benchmark_$DATE.png
Event Timeline
Log In to Comment