summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/bb-perf
diff options
context:
space:
mode:
authorLuis Martins <luis.martins@criticaltechworks.com>2020-03-24 11:33:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-24 16:39:40 +0000
commitfe1e4a47718a78063cb31a7ba50889ed6a7a353c (patch)
tree317b493fb8321fac6a834f5e235bf7e928e3c357 /scripts/contrib/bb-perf
parent5ea725cd5a9c6ce1f411bc890d7bacb9865fd437 (diff)
downloadpoky-fe1e4a47718a78063cb31a7ba50889ed6a7a353c.tar.gz
buildstats-plot.sh: filter by task
Extend buildstats-plot.sh script to also accept the name of the tasks as parameter. This value will be passed directly to buildstats.sh is already provides this option. (From OE-Core rev: 495b6d3d85d2d14d54e324d8da43311a23fdfca6) Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/bb-perf')
-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')