Created
March 31, 2015 14:08
-
-
Save anak10thn/70df5b60b825a13203bc to your computer and use it in GitHub Desktop.
porcupine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #script directory label | |
| DIR=`pwd`"/"$1 | |
| if [ -d $DIR ] | |
| then | |
| PT=$DIR | |
| else | |
| echo "Directory not exist" | |
| exit 0 | |
| fi | |
| DATE=`date +%Y%m%d` | |
| TIME=`date +%T | sed s/:/-/g` | |
| LABEL=$2 | |
| PLOT="" | |
| mkdir -p bench/$DATE/plot | |
| touch bench/$DATE/plot/$DATE$TIME | |
| ls $PT*.dat >bench/$DATE/plot/$DATE$TIME-file.txt | |
| while read line | |
| do | |
| NFILE=`basename $line` | |
| PLOT+="\"$line\" using 9 smooth sbezier with lines title \"$NFILE\"*" | |
| done < bench/$DATE/plot/$DATE$TIME-file.txt | |
| DPLOT=`echo $PLOT|sed s/*/,/g` | |
| cat > bench/$DATE/plot/$DATE$TIME <<EOF | |
| set terminal png | |
| set output "bench/$DATE/$LABEL-$DATE$TIME.png" | |
| set title "$LABEL" | |
| set size 1,0.7 | |
| set grid y | |
| set xlabel "request" | |
| set ylabel "response time (ms)" | |
| plot $DPLOT | |
| EOF | |
| gnuplot bench/$DATE/plot/$DATE$TIME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #script directory label | |
| DIR=`pwd`"/"$1 | |
| if [ -d $DIR ] | |
| then | |
| PT=$DIR | |
| else | |
| echo "Directory not exist" | |
| exit 0 | |
| fi | |
| DATE=`date +%Y%m%d` | |
| TIME=`date +%T | sed s/:/-/g` | |
| LABEL=$2 | |
| PLOT="" | |
| mkdir -p bench/$DATE/plot | |
| touch bench/$DATE/plot/$DATE$TIME | |
| ls $PT*.dat >bench/$DATE/plot/$DATE$TIME-file.txt | |
| while read line | |
| do | |
| NFILE=`basename $line` | |
| PLOT+="\"$line\" using 9 smooth sbezier with lines title \"$NFILE\"*" | |
| done < bench/$DATE/plot/$DATE$TIME-file.txt | |
| DPLOT=`echo $PLOT|sed s/*/,/g` | |
| cat > bench/$DATE/plot/$DATE$TIME <<EOF | |
| set terminal canvas | |
| set output "bench/$DATE/$LABEL-$DATE$TIME.html" | |
| set title "$LABEL" | |
| set size 1,0.7 | |
| set grid y | |
| set xlabel "request" | |
| set ylabel "response time (ms)" | |
| plot $DPLOT | |
| EOF | |
| gnuplot bench/$DATE/plot/$DATE$TIME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #script n c google.com/ google | |
| N=$1 | |
| C=$2 | |
| LABEL=$4 | |
| DATE=`date +%Y%m%d` | |
| TIME=`date +%T | sed s/:/-/g` | |
| URL='http://'$3 | |
| mkdir -p data/$DATE/plot | |
| touch data/$DATE/plot/$DATE$TIME | |
| ab -n $N -c $C -g data/$DATE/$LABEL$DATE$TIME.dat $URL | |
| cat > data/$DATE/plot/$DATE$TIME <<EOF | |
| set terminal png | |
| set output "data/$DATE/$LABEL$DATE$TIME.png" | |
| set title "ab -n $N -c $C $URL" | |
| set size 1,0.7 | |
| set grid y | |
| set xlabel "request" | |
| set ylabel "response time (ms)" | |
| plot "data/$DATE/$LABEL$DATE$TIME.dat" using 9 smooth sbezier with lines title "something" | |
| EOF | |
| gnuplot data/$DATE/plot/$DATE$TIME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #script n c google.com/ google | |
| N=$1 | |
| C=$2 | |
| LABEL=$4 | |
| DATE=`date +%Y%m%d` | |
| TIME=`date +%T | sed s/:/-/g` | |
| URL=$3 | |
| mkdir -p data/$DATE/plot | |
| touch data/$DATE/plot/$DATE$TIME | |
| ab -n $N -c $C -g data/$DATE/$LABEL$DATE$TIME.dat $URL | |
| cat > data/$DATE/plot/$DATE$TIME <<EOF | |
| set terminal canvas | |
| set output "data/$DATE/$LABEL$DATE$TIME.html" | |
| set title "ab -n $N -c $C $URL" | |
| set size 1,0.7 | |
| set grid y | |
| set xlabel "request" | |
| set ylabel "response time (ms)" | |
| plot "data/$DATE/$LABEL$DATE$TIME.dat" using 9 smooth sbezier with lines title "something" | |
| EOF | |
| gnuplot data/$DATE/plot/$DATE$TIME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment