Lines Matching +full:1 +full:d +full:- +full:histogram

5 # SPDX-License-Identifier: GPL-2.0-or-later
10 # depending if either the -S parameter is present or not:
12 # * without -S: Produces a histogram listing top N recipes/tasks versus
13 # stats. The first stat defined in the -s parameter is the one taken
15 # * -S: Produces a histogram listing tasks versus stats. In this case,
17 # Stats values are in descending order defined by the first stat defined on -s
21 # 1. Top recipes' tasks taking into account utime
23 # $ buildstats-plot.sh -s utime | gnuplot -p
27 # $ buildstats-plot.sh -s utime:stime -S | gnuplot -p
31 # $ buildstats-plot.sh -s 'IO write_bytes:IO read_bytes' -S | gnuplot -p
37 set -o nounset
38 set -o errexit
47 OUTDATA_FILE="$PWD/buildstats-plot.out"
52 Usage: $CMD [-b buildstats_dir] [-t do_task]
53 -b buildstats The path where the folder resides
55 -n N Top N recipes to display. Ignored if -S is present
57 -r recipe The recipe mask to be searched
58 -t tasks The tasks to be computed
60 -s stats The stats to be matched. If more that one stat, units
61 should be the same because data is plot as histogram.
62 (see buildstats.sh -h for all options) or any other defined
65 -a Accumulate all stats values for found recipes
66 -S Sum values for a particular stat for found recipes
67 -o Output data file.
69 -h Display this help message
83 RECIPE="-r $OPTARG"
92 ACCUMULATE="-a"
106 exit 1
120 $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $RECIPE $ACCUMULATE -H > $OUTBUILDSTATS
123 HEADERS=$(cat $OUTBUILDSTATS | sed -n -e 's/\(.*\)/"\1"/' -e '1s/ /\\\\\\\\ /g' -e 's/_/\\\\\\\\_/g…
125 echo -e "set boxwidth 0.9 relative"
126 echo -e "set style data histograms"
127 echo -e "set style fill solid 1.0 border lt -1"
128 echo -e "set xtics rotate by 45 right"
131 if [ -z "$SUM" ]; then
132 cat $OUTBUILDSTATS | sed -e '1d' -e 's/_/\\\\_/g' | sort -k3 -n -r | head -$N > $OUTDATA_FILE
134 sed -i -e "1i\
136 echo -e "set title \"Top task/recipes\""
137 …echo -e "plot for [COL=3:`expr 3 + ${nstats} - 1`] '${OUTDATA_FILE}' using COL:xtic(stringcolumn(1
141 declare -a sumargs
144 sumargs[j]=sum; j=$(( $j + 1 ))
145 sumargs[j]=`expr 3 + $i - 1`; j=$(( $j + 1 ))
149 …cat $OUTBUILDSTATS | sed -e '1d' | datamash -t ' ' -g1 ${sumargs[*]} | sort -k2 -n -r > $OUTDATA_F…
152 HEADERS=$(echo $HEADERS | sed -e 's/recipe//1')
153 sed -i -e "1i\
157 echo -e "set title \"Sum stats values per task for all recipes\""
158 …echo -e "plot for [COL=2:`expr 2 + ${nstats} - 1`] '${OUTDATA_FILE}' using COL:xtic(1) title colum…