diff options
Diffstat (limited to 'scripts/contrib/bb-perf/buildstats-plot.sh')
-rwxr-xr-x | scripts/contrib/bb-perf/buildstats-plot.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/contrib/bb-perf/buildstats-plot.sh b/scripts/contrib/bb-perf/buildstats-plot.sh index 1d22e60d73..f26312f355 100755 --- a/scripts/contrib/bb-perf/buildstats-plot.sh +++ b/scripts/contrib/bb-perf/buildstats-plot.sh | |||
@@ -41,6 +41,7 @@ BS_DIR="tmp/buildstats" | |||
41 | N=10 | 41 | N=10 |
42 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" | 42 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" |
43 | STATS="utime" | 43 | STATS="utime" |
44 | ACCUMULATE="" | ||
44 | SUM="" | 45 | SUM="" |
45 | OUTDATA_FILE="$PWD/buildstats-plot.out" | 46 | OUTDATA_FILE="$PWD/buildstats-plot.out" |
46 | 47 | ||
@@ -59,6 +60,7 @@ Usage: $CMD [-b buildstats_dir] [-t do_task] | |||
59 | (see buildstats.sh -h for all options) or any other defined | 60 | (see buildstats.sh -h for all options) or any other defined |
60 | (build)stat separated by colons, i.e. stime:utime | 61 | (build)stat separated by colons, i.e. stime:utime |
61 | (default: "$STATS") | 62 | (default: "$STATS") |
63 | -a Accumulate all stats values for found recipes | ||
62 | -S Sum values for a particular stat for found recipes | 64 | -S Sum values for a particular stat for found recipes |
63 | -o Output data file. | 65 | -o Output data file. |
64 | (default: "$OUTDATA_FILE") | 66 | (default: "$OUTDATA_FILE") |
@@ -67,7 +69,7 @@ EOM | |||
67 | } | 69 | } |
68 | 70 | ||
69 | # Parse and validate arguments | 71 | # Parse and validate arguments |
70 | while getopts "b:n:t:s:o:Sh" OPT; do | 72 | while getopts "b:n:t:s:o:aSh" OPT; do |
71 | case $OPT in | 73 | case $OPT in |
72 | b) | 74 | b) |
73 | BS_DIR="$OPTARG" | 75 | BS_DIR="$OPTARG" |
@@ -81,6 +83,9 @@ while getopts "b:n:t:s:o:Sh" OPT; do | |||
81 | s) | 83 | s) |
82 | STATS="$OPTARG" | 84 | STATS="$OPTARG" |
83 | ;; | 85 | ;; |
86 | a) | ||
87 | ACCUMULATE="-a" | ||
88 | ;; | ||
84 | S) | 89 | S) |
85 | SUM="y" | 90 | SUM="y" |
86 | ;; | 91 | ;; |
@@ -107,7 +112,7 @@ CD=$(dirname $0) | |||
107 | 112 | ||
108 | # Parse buildstats recipes to produce a single table | 113 | # Parse buildstats recipes to produce a single table |
109 | OUTBUILDSTATS="$PWD/buildstats.log" | 114 | OUTBUILDSTATS="$PWD/buildstats.log" |
110 | $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" -H > $OUTBUILDSTATS | 115 | $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $ACCUMULATE -H > $OUTBUILDSTATS |
111 | 116 | ||
112 | # Get headers | 117 | # Get headers |
113 | HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') | 118 | HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') |