summaryrefslogtreecommitdiffstats
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:37 +0000
commit495b6d3d85d2d14d54e324d8da43311a23fdfca6 (patch)
tree96b519e9af8979d9d6fb165a6f883fe87dbadc6f
parent9f4ee2ee8712528ac51ef4ecd17ccde737e8b21d (diff)
downloadopenembedded-core-contrib-495b6d3d85d2d14d54e324d8da43311a23fdfca6.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. Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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
BS_DIR="tmp/buildstats"
N=10
+TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack"
STATS="utime"
SUM=""
OUTDATA_FILE="$PWD/buildstats-plot.out"
@@ -51,6 +52,8 @@ Usage: $CMD [-b buildstats_dir] [-t do_task]
(default: "$BS_DIR")
-n N Top N recipes to display. Ignored if -S is present
(default: "$N")
+ -t tasks The tasks to be computed
+ (default: "$TASKS")
-s stats The stats to be matched. If more that one stat, units
should be the same because data is plot as histogram.
(see buildstats.sh -h for all options) or any other defined
@@ -64,7 +67,7 @@ EOM
}
# Parse and validate arguments
-while getopts "b:n:s:o:Sh" OPT; do
+while getopts "b:n:t:s:o:Sh" OPT; do
case $OPT in
b)
BS_DIR="$OPTARG"
@@ -72,6 +75,9 @@ while getopts "b:n:s:o:Sh" OPT; do
n)
N="$OPTARG"
;;
+ t)
+ TASKS="$OPTARG"
+ ;;
s)
STATS="$OPTARG"
;;
@@ -101,7 +107,7 @@ CD=$(dirname $0)
# Parse buildstats recipes to produce a single table
OUTBUILDSTATS="$PWD/buildstats.log"
-$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -H > $OUTBUILDSTATS
+$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" -H > $OUTBUILDSTATS
# Get headers
HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp')