Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68002904
benchmark.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, Jun 25, 10:59
Size
725 B
Mime Type
text/x-shellscript
Expires
Thu, Jun 27, 10:59 (2 d)
Engine
blob
Format
Raw Data
Handle
18509548
Attached To
rPHINFRA c4science
benchmark.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