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 f26312f355..320c4910a1 100755 --- a/scripts/contrib/bb-perf/buildstats-plot.sh +++ b/scripts/contrib/bb-perf/buildstats-plot.sh | |||
@@ -39,6 +39,7 @@ set -o errexit | |||
39 | 39 | ||
40 | BS_DIR="tmp/buildstats" | 40 | BS_DIR="tmp/buildstats" |
41 | N=10 | 41 | N=10 |
42 | RECIPE="" | ||
42 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" | 43 | TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" |
43 | STATS="utime" | 44 | STATS="utime" |
44 | ACCUMULATE="" | 45 | ACCUMULATE="" |
@@ -53,6 +54,7 @@ Usage: $CMD [-b buildstats_dir] [-t do_task] | |||
53 | (default: "$BS_DIR") | 54 | (default: "$BS_DIR") |
54 | -n N Top N recipes to display. Ignored if -S is present | 55 | -n N Top N recipes to display. Ignored if -S is present |
55 | (default: "$N") | 56 | (default: "$N") |
57 | -r recipe The recipe mask to be searched | ||
56 | -t tasks The tasks to be computed | 58 | -t tasks The tasks to be computed |
57 | (default: "$TASKS") | 59 | (default: "$TASKS") |
58 | -s stats The stats to be matched. If more that one stat, units | 60 | -s stats The stats to be matched. If more that one stat, units |
@@ -69,7 +71,7 @@ EOM | |||
69 | } | 71 | } |
70 | 72 | ||
71 | # Parse and validate arguments | 73 | # Parse and validate arguments |
72 | while getopts "b:n:t:s:o:aSh" OPT; do | 74 | while getopts "b:n:r:t:s:o:aSh" OPT; do |
73 | case $OPT in | 75 | case $OPT in |
74 | b) | 76 | b) |
75 | BS_DIR="$OPTARG" | 77 | BS_DIR="$OPTARG" |
@@ -77,6 +79,9 @@ while getopts "b:n:t:s:o:aSh" OPT; do | |||
77 | n) | 79 | n) |
78 | N="$OPTARG" | 80 | N="$OPTARG" |
79 | ;; | 81 | ;; |
82 | r) | ||
83 | RECIPE="-r $OPTARG" | ||
84 | ;; | ||
80 | t) | 85 | t) |
81 | TASKS="$OPTARG" | 86 | TASKS="$OPTARG" |
82 | ;; | 87 | ;; |
@@ -112,7 +117,7 @@ CD=$(dirname $0) | |||
112 | 117 | ||
113 | # Parse buildstats recipes to produce a single table | 118 | # Parse buildstats recipes to produce a single table |
114 | OUTBUILDSTATS="$PWD/buildstats.log" | 119 | OUTBUILDSTATS="$PWD/buildstats.log" |
115 | $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $ACCUMULATE -H > $OUTBUILDSTATS | 120 | $CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $RECIPE $ACCUMULATE -H > $OUTBUILDSTATS |
116 | 121 | ||
117 | # Get headers | 122 | # Get headers |
118 | HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') | 123 | HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') |