Skip to content

Commit 5322894

Browse files
author
Takashi Sogabe
committed
Add option '-u UNIT' for changing unit of measure in gp_throughput.sh
1 parent 68bc174 commit 5322894

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

priv/gp_throughput.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ function Usage {
1616
echo " -p PRE_COMMAND: any command to be executed before plot" >&2
1717
echo " default: nothing" >&2
1818
echo " -P: print gnuplot script to stdout" >&2
19+
echo " -u UNIT: unit of measurement" >&2
20+
echo " default: \"ops/sec\"" >&2
1921
echo " -h: print this usage" >&2
2022
exit 1
2123
}
@@ -26,8 +28,9 @@ TERMINAL_COMMAND=
2628
PLOT_STYLE="linespoints pointsize 2 linewidth 1"
2729
PRE_COMMAD=
2830
EXEC_COMMAND="gnuplot -persist"
31+
UNIT="ops/sec"
2932

30-
while getopts ":d:k:t:s:p:Ph" opt; do
33+
while getopts ":d:k:t:s:p:u:Ph" opt; do
3134
case $opt in
3235
d)
3336
TEST_DIR=${OPTARG} ;;
@@ -41,6 +44,8 @@ while getopts ":d:k:t:s:p:Ph" opt; do
4144
PRE_COMMAD=${OPTARG} ;;
4245
P)
4346
EXEC_COMMAND="cat" ;;
47+
u)
48+
UNIT="${OPTARG}" ;;
4449
h)
4550
Usage ;;
4651
\?)
@@ -97,12 +102,12 @@ ${EXEC_COMMAND} << EOF
97102
${TERMINAL_COMMAND}
98103
99104
## title, key and axis
100-
set title "Throughput [ops/sec]"
105+
set title "Throughput ${UNIT}"
101106
set autoscale
102107
set yrange [0:]
103108
set grid
104109
set xlabel "Elapsed [sec]"
105-
set ylabel "ops/sec"
110+
set ylabel "${UNIT}"
106111
set key inside bottom
107112
108113
## data file

0 commit comments

Comments
 (0)