Reverse the k6 plots that measure throughput 43/22343/2 master
authorhalil.cakal <halil.cakal@est.tech>
Thu, 3 Oct 2024 09:26:56 +0000 (10:26 +0100)
committerhalil.cakal <halil.cakal@est.tech>
Thu, 3 Oct 2024 14:37:51 +0000 (15:37 +0100)
- 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>
jjb/onap/cps/prepare-k6-performance-tests-plots.sh

index 0b3bf93688498811fe19bc52a30780dcbbdf8a12..5c34bd81de09e20a271a9687c402070d79784092 100755 (executable)
@@ -104,10 +104,16 @@ set terminal pngcairo size 1500,600
 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 @@ findMaxPlotRange() {
     if (max == 0) {
       max = 1;
     }
-    print max * 2;
+    print max * 1.5;
   }' "$dataFile"
 }