Harrison Mutai | 4126dc7 | 2021-11-23 11:34:41 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2022 Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | # Determine the number of test groups, scale the terminal based on the number |
| 8 | # of these. |
| 9 | groups=system(sprintf("awk -F ',' 'NR!=1 {print $1}' %s | sort | uniq", ARG1)) |
| 10 | group_count=words(groups) |
| 11 | |
| 12 | # Terminal height should scale with the number of groups |
| 13 | # (each group has a plot). |
| 14 | set terminal pngcairo enhanced size 5400,9600 font ',14' |
| 15 | |
| 16 | set xrange [0:5<*] extend |
| 17 | set ytic scale 0 nomirror |
| 18 | set grid xtics |
| 19 | set lmargin 70 |
| 20 | set bmargin 5 |
| 21 | set yrange [:] reverse |
| 22 | set offsets 0,0,0.5,0.5 |
| 23 | set datafile separator "," |
| 24 | |
| 25 | set key autotitle columnhead |
| 26 | |
| 27 | # Create linetypes for coloured labels |
| 28 | set linetype 1 linecolor "red" |
| 29 | set linetype 2 linecolor "black" |
| 30 | fill(n) = word("green red orange gray", n) |
| 31 | |
| 32 | set multiplot title "TF-A CI Test Results: " . jenkins_id \ |
| 33 | font ",30" layout ceil(group_count/3.0),3 |
| 34 | |
| 35 | set style data histograms |
| 36 | set style fill solid 0.3 border -1 |
| 37 | set key outside left vertical |
| 38 | set label "Test Suites" at screen 0.05,0.5 \ |
| 39 | center front rotate font ",20" |
| 40 | |
| 41 | do for [group in groups]{ |
| 42 | set title group font ",18" |
| 43 | set style histogram rowstacked |
| 44 | filter = "awk -F, 'NR==1 || $1==\"".group."\"'" |
| 45 | col_count = 8 |
| 46 | box_width = 0.5 |
| 47 | |
| 48 | plot for [col=5:col_count] '< '.filter.' '.ARG1 u col:0: \ |
| 49 | (sum [i=5:col-1] column(i)): \ |
| 50 | (sum [i=5:col] column(i)): \ |
| 51 | ($0-box_width/2.):($0+box_width/2.):ytic(2) w boxxyerror \ |
| 52 | ti columnhead(col) lc rgb fill(col-4) |
| 53 | |
| 54 | unset key |
| 55 | } |
| 56 | |
| 57 | unset multiplot |
| 58 | |