cicd repo: Add second limit (cps limit) to the plots
- add cps limit (line) to the plots with green color
- change the color of threshold line (current) to the blue color
Issue-ID: CPS-2350
Change-Id: I93e8594bf42ea17f17b2f2b80460511df6bc60c7
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 a2033c7..c8a8282 100755
--- a/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
+++ b/jjb/onap/cps/prepare-k6-performance-tests-plots.sh
@@ -103,12 +103,22 @@
set output "${chartFileName}"
set xlabel "Build"
set ylabel "${units}"
-set yrange [0 : ${y_max} < *]
-set style line 1 lc rgb '#d3d3d3' lt 1 lw 1 dashtype 2
+
+# Set y-axis range based on y_max
+set yrange [0 : ${y_max}]
+
+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
+set style line 4 lc rgb '#800080' lt 1 lw 1 # measured - Purple
+
set grid ytics ls 1
set xtics rotate
-plot '$dataFile' using 1:3:xtic(sprintf("%d", column(1))) with linespoints title "measured", \
- '$dataFile' using 1:2 with lines linestyle 2 title "limit"
+
+# Use plot command with explicit column assignments and lines for all series
+plot '$dataFile' using 1:2 with lines linestyle 2 title "threshold", \
+ '$dataFile' using 1:3 with lines linestyle 3 title "cps-limit", \
+ '$dataFile' using 1:4:xtic(1) with linespoints linestyle 4 title "measured"
EOT
# Run the temporary Gnuplot script
@@ -124,7 +134,11 @@
awk -F, '{
if ($2 > max) max = $2;
if ($3 > max) max = $3;
+ if ($4 > max) max = $4;
} END {
+ if (max == 0) {
+ max = 100;
+ }
print max * 1.2;
}' "$dataFile"
}