From: halil.cakal Date: Tue, 10 Sep 2024 15:05:36 +0000 (+0100) Subject: cicd repo: Add second limit (cps limit) to the plots X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=0d4a9c1898845f6f274fd65c71f9057b7aa88312;p=infra%2Fcicd.git 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 --- diff --git a/jjb/onap/cps/prepare-k6-performance-tests-plots.sh b/jjb/onap/cps/prepare-k6-performance-tests-plots.sh index a2033c78..c8a82821 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 terminal pngcairo size 1500,600 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 @@ findMaxPlotRange() { 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" }