summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/bb-perf/buildstats.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib/bb-perf/buildstats.sh')
-rwxr-xr-xscripts/contrib/bb-perf/buildstats.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/contrib/bb-perf/buildstats.sh b/scripts/contrib/bb-perf/buildstats.sh
index 26bfaca86b..2f017efeb8 100755
--- a/scripts/contrib/bb-perf/buildstats.sh
+++ b/scripts/contrib/bb-perf/buildstats.sh
@@ -36,6 +36,7 @@ Child rusage ru_majflt:Child rusage ru_inblock:Child rusage ru_oublock:Child rus
36Child rusage ru_nivcsw" 36Child rusage ru_nivcsw"
37 37
38BS_DIR="tmp/buildstats" 38BS_DIR="tmp/buildstats"
39RECIPE=""
39TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack" 40TASKS="compile:configure:fetch:install:patch:populate_lic:populate_sysroot:unpack"
40STATS="$TIME" 41STATS="$TIME"
41ACCUMULATE="" 42ACCUMULATE=""
@@ -47,6 +48,7 @@ cat <<EOM
47Usage: $CMD [-b buildstats_dir] [-t do_task] 48Usage: $CMD [-b buildstats_dir] [-t do_task]
48 -b buildstats The path where the folder resides 49 -b buildstats The path where the folder resides
49 (default: "$BS_DIR") 50 (default: "$BS_DIR")
51 -r recipe The recipe to be computed
50 -t tasks The tasks to be computed 52 -t tasks The tasks to be computed
51 (default: "$TASKS") 53 (default: "$TASKS")
52 -s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE 54 -s stats The stats to be matched. Options: TIME, IO, RUSAGE, CHILD_RUSAGE
@@ -63,11 +65,14 @@ EOM
63} 65}
64 66
65# Parse and validate arguments 67# Parse and validate arguments
66while getopts "b:t:s:aHh" OPT; do 68while getopts "b:r:t:s:aHh" OPT; do
67 case $OPT in 69 case $OPT in
68 b) 70 b)
69 BS_DIR="$OPTARG" 71 BS_DIR="$OPTARG"
70 ;; 72 ;;
73 r)
74 RECIPE="$OPTARG"
75 ;;
71 t) 76 t)
72 TASKS="$OPTARG" 77 TASKS="$OPTARG"
73 ;; 78 ;;
@@ -133,7 +138,7 @@ fi
133 138
134for task in ${TASKS}; do 139for task in ${TASKS}; do
135 task="do_${task}" 140 task="do_${task}"
136 for file in $(find ${BS_DIR} -type f -name ${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do 141 for file in $(find ${BS_DIR} -type f -path *${RECIPE}*/${task} | awk 'BEGIN{ ORS=""; OFS=":" } { print $0,"" }'); do
137 recipe="$(basename $(dirname $file))" 142 recipe="$(basename $(dirname $file))"
138 times="" 143 times=""
139 for stat in ${stats}; do 144 for stat in ${stats}; do