summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2020-03-25 09:51:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-29 12:05:31 +0100
commit325b820dae14afd28e95624cb325e464001018fc (patch)
tree008806b42d6ae07551dfecc78d80c9f31ba81318 /scripts
parentd1b00626c33cd1bb90d6a4012fb8bfe562639c6f (diff)
downloadpoky-325b820dae14afd28e95624cb325e464001018fc.tar.gz
buildstats-plot.sh: Show spaces and underscores correctly in titles/keys
Spaces were previously converted to dashes, and underscores caused the next character in the title/key to be printed using subscript due to the enhanced string support in gnuplot. (From OE-Core rev: 1719f7062988889b7e24b871dc2f0e50c7bff07e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/bb-perf/buildstats-plot.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/contrib/bb-perf/buildstats-plot.sh b/scripts/contrib/bb-perf/buildstats-plot.sh
index 80fd30960c..45c27d0b97 100755
--- a/scripts/contrib/bb-perf/buildstats-plot.sh
+++ b/scripts/contrib/bb-perf/buildstats-plot.sh
@@ -120,7 +120,7 @@ OUTBUILDSTATS="$PWD/buildstats.log"
120$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $RECIPE $ACCUMULATE -H > $OUTBUILDSTATS 120$CD/buildstats.sh -b "$BS_DIR" -s "$STATS" -t "$TASKS" $RECIPE $ACCUMULATE -H > $OUTBUILDSTATS
121 121
122# Get headers 122# Get headers
123HEADERS=$(cat $OUTBUILDSTATS | sed -n -e '1s/ /-/g' -e '1s/:/ /gp') 123HEADERS=$(cat $OUTBUILDSTATS | sed -n -e 's/\(.*\)/"\1"/' -e '1s/ /\\\\\\\\ /g' -e 's/_/\\\\\\\\_/g' -e '1s/:/" "/gp')
124 124
125echo -e "set boxwidth 0.9 relative" 125echo -e "set boxwidth 0.9 relative"
126echo -e "set style data histograms" 126echo -e "set style data histograms"
@@ -129,7 +129,7 @@ echo -e "set xtics rotate by 45 right"
129 129
130# Get output data 130# Get output data
131if [ -z "$SUM" ]; then 131if [ -z "$SUM" ]; then
132 cat $OUTBUILDSTATS | sed -e '1d' | sort -k3 -n -r | head -$N > $OUTDATA_FILE 132 cat $OUTBUILDSTATS | sed -e '1d' -e 's/_/\\\\_/g' | sort -k3 -n -r | head -$N > $OUTDATA_FILE
133 # include task at recipe column 133 # include task at recipe column
134 sed -i -e "1i\ 134 sed -i -e "1i\
135${HEADERS}" $OUTDATA_FILE 135${HEADERS}" $OUTDATA_FILE