File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,25 @@ benchmark ()
55 ab_log=" output/$fw .ab.log"
66 output=" output/$fw .output"
77
8+ # get rpm
89 echo " ab -c 10 -t 3 $url "
910 ab -c 10 -t 3 " $url " > " $ab_log "
10- curl " $url " > " $output "
11-
1211 rps=` grep " Requests per second:" " $ab_log " | cut -f 7 -d " " `
12+
13+ # get time
14+ count=10
15+ total=0
16+ for (( i= 0 ; i < $count ; i++ )) ; do
17+ curl " $url " > " $output "
18+ t=` tail -1 " $output " | cut -f 2 -d ' :' `
19+ total=` php ./benchmarks/sum_ms.php $t $total `
20+ done
21+ time=` php ./benchmarks/avg_ms.php $total $count `
22+
23+ # get memory and file
1324 memory=` tail -1 " $output " | cut -f 1 -d ' :' `
14- time=` tail -1 " $output " | cut -f 2 -d ' :' `
1525 file=` tail -1 " $output " | cut -f 3 -d ' :' `
26+
1627 echo " $fw : $rps : $memory : $time : $file " >> " $results_file "
1728
1829 echo " $fw " >> " $check_file "
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ total = $ argv [1 ];
4+ $ count = $ argv [2 ];
5+
6+ echo $ total / $ count ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ ms = $ argv [1 ];
4+ $ total = $ argv [2 ];
5+
6+ echo $ ms + $ total ;
You can’t perform that action at this time.
0 commit comments