77# commit SHA of the build you're interested in, and the second is the name of
88# the builder. For example:
99#
10- # ./src/etc/cpu-usage-over-time-plot.sh e699ea096fcc2fc9ce8e8bcf884e11496a31cc9f i686-mingw-1
10+ # ./src/etc/cpu-usage-over-time-plot.sh 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c x86_64-gnu
1111#
1212# That will generate `$builder.png` in the current directory which you can open
1313# up to see a hopefully pretty graph.
1414#
1515# Improvements to this script are greatly appreciated!
1616
17+ if [[ $# != 2 ]]; then
18+ echo " expected 2 arguments, recieved $# "
19+ echo " example usage: './src/etc/cpu-usage-over-time-plot.sh \
20+ 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c \
21+ x86_64-gnu'"
22+ exit 1
23+ fi
24+
1725set -ex
1826
1927bucket=rust-lang-ci2
@@ -30,7 +38,7 @@ set ylabel "CPU Usage %"
3038set xlabel "Time"
3139set datafile sep ','
3240set term png size 3000,1000
33- set output "$builder .png"
41+ set output "$builder - $commit -cpu-usage-plot .png"
3442set grid
3543
3644f(x) = mean_y
@@ -43,7 +51,9 @@ set ytics 10
4351set boxwidth 0.5
4452
4553plot \\
46- mean_y with lines linetype 1 linecolor rgb "#ff0000" title "average", \\
47- "cpu- $builder .csv" using 1:(100-\$ 2) with points pointtype 7 pointsize 0.4 title "$builder ", \\
48- "" using 1:(100-\$ 2) smooth bezier linewidth 3 title "bezier"
54+ mean_y with lines linetype 1 linecolor rgb "#ff0000" title "average", "cpu- $builder .csv" \\
55+ using 1:(100-\$ 2) with points pointtype 7 pointsize 0.4 title "$builder ", "" \\
56+ using 1:(100-\$ 2) smooth bezier linewidth 3 title "bezier"
4957EOF
58+
59+ rm " cpu-$builder .csv"
0 commit comments