summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/bb-perf/buildstats-plot.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/contrib/bb-perf/buildstats-plot.sh b/scripts/contrib/bb-perf/buildstats-plot.sh
index 089621c9f8..1d22e60d73 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
40BS_DIR="tmp/buildstats" 40BS_DIR="tmp/buildstats"
41N=10 41N=10
42TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack"
42STATS="utime" 43STATS="utime"
43SUM="" 44SUM=""
44OUTDATA_FILE="$PWD/buildstats-plot.out" 45OUTDATA_FILE="$PWD/buildstats-plot.out"
@@ -51,6 +52,8 @@ Usage: $CMD [-b buildstats_dir] [-t do_task]
51 (default: "$BS_DIR") 52 (default: "$BS_DIR")
52 -n N Top N recipes to display. Ignored if -S is present 53 -n N Top N recipes to display. Ignored if -S is present
53 (default: "$N") 54 (default: "$N")
55 -t tasks The tasks to be computed
56 (default: "$TASKS")
54 -s stats The stats to be matched. If more that one stat, units 57 -s stats The stats to be matched. If more that one stat, units
55 should be the same because data is plot as histogram. 58 should be the same because data is plot as histogram.
56 (see buildstats.sh -h for all options) or any other defined 59 (see buildstats.sh -h for all options) or any other defined
@@ -64,7 +67,7 @@ EOM
64} 67}
65 68
66# Parse and validate arguments 69# Parse and validate arguments
67while getopts "b:n:s:o:Sh" OPT; do 70while getopts "b:n:t:s:o:Sh" OPT; do
68 case $OPT in 71 case $OPT in
69 b) 72 b)
70 BS_DIR="$OPTARG" 73 BS_DIR="$OPTARG"
@@ -72,6 +75,9 @@ while getopts "b:n:s:o:Sh" OPT; do
72 n) 75 n)
73 N="$OPTARG" 76 N="$OPTARG"
74 ;; 77 ;;
78 t)
79 TASKS="$OPTARG"
80 ;;
75 s) 81 s)
76 STATS="$OPTARG" 82 STATS="$OPTARG"
77 ;; 83 ;;
@@ -101,7 +107,7 @@ CD=$(dirname $0)
101 107
102# Parse buildstats recipes to produce a single table 108# Parse buildstats recipes to produce a single table
103OUTBUILDSTATS="$PWD/buildstats.log" 109OUTBUILDSTATS="$PWD/buildstats.log"
104$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -H > $OUTBUILDSTATS 110$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" -H > $OUTBUILDSTATS
105 111
106# Get headers 112# Get headers
107HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') 113HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp')