Reverse the k6 plots that measure throughput
- divert y-axis for those measuring throughput
- change the factor from 2 to 1.5 for y-axis max
Issue-ID: CPS-2431
Change-Id: Ib71c1f32e3c267bc9ee6bfd5a26059113d3c42bd
Signed-off-by: halil.cakal <halil.cakal@est.tech>
diff --git a/jjb/onap/cps/prepare-k6-performance-tests-plots.sh b/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
index 0b3bf93..5c34bd8 100755
--- a/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
+++ b/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
@@ -104,10 +104,16 @@
set output "${chartFileName}"
set xlabel "Build"
set ylabel "${units}"
+EOT
# Set y-axis range based on y_max
-set yrange [0 : ${y_max}]
+if [[ "$units" == */second ]]; then
+ echo "set yrange [${y_max} : 0] reverse" >> gnuplot_script.gp
+else
+ echo "set yrange [0 : ${y_max}]" >> gnuplot_script.gp
+fi
+cat <<EOT >>gnuplot_script.gp
set style line 1 lc rgb '#d3d3d3' lt 1 lw 1 dashtype 2 # Grid style
set style line 2 lc rgb '#0000FF' lt 1 lw 1 # threshold - Blue
set style line 3 lc rgb '#00FF00' lt 1 lw 1 # cps-limit - Green
@@ -158,7 +164,7 @@
if (max == 0) {
max = 1;
}
- print max * 2;
+ print max * 1.5;
}' "$dataFile"
}