diff options
author | Darren Hart <dvhart@linux.intel.com> | 2013-01-18 23:13:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-21 10:20:21 +0000 |
commit | 90dc44c8246f2a580fe4a41ce28c201e52307500 (patch) | |
tree | 59ab4f92c77997ce26687aff637bf9b2e9681748 /scripts/contrib/bb-perf/bb-matrix-plot.sh | |
parent | 121cb96964fe2f374d814bf39036119bd63b9589 (diff) | |
download | openembedded-core-90dc44c8246f2a580fe4a41ce28c201e52307500.tar.gz openembedded-core-90dc44c8246f2a580fe4a41ce28c201e52307500.tar.bz2 openembedded-core-90dc44c8246f2a580fe4a41ce28c201e52307500.zip |
bb-matrix: Fix min and max calculations
The BB and PM ranges were originally intended to use leading 0s to
ensure all the values were the same string length, making for nice log
filenames and columnar dat files. However, not everyone will do this -
especially if it isn't documented.
Document the intent. Make the generation and parsing of dat files robust
to either method.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/bb-perf/bb-matrix-plot.sh')
-rwxr-xr-x | scripts/contrib/bb-perf/bb-matrix-plot.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/contrib/bb-perf/bb-matrix-plot.sh b/scripts/contrib/bb-perf/bb-matrix-plot.sh index 62aa66d96d..87e8cb1abd 100755 --- a/scripts/contrib/bb-perf/bb-matrix-plot.sh +++ b/scripts/contrib/bb-perf/bb-matrix-plot.sh @@ -101,12 +101,12 @@ if [ -z "$TITLE" ]; then fi # Determine the dgrid3d mesh dimensions size -MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sort | uniq | head -n1) -MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sort | uniq | tail -n1) -BB_CNT=$[${MAX#*0} - $MIN + 1] -MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sort | uniq | head -n1) -MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sort | uniq | tail -n1) -PM_CNT=$[${MAX#*0} - $MIN + 1] +MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | head -n1) +MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 1 | sed 's/^0*//' | sort -n | uniq | tail -n1) +BB_CNT=$[${MAX} - $MIN + 1] +MIN=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | head -n1) +MAX=$(tail -n +2 "$DATFILE" | cut -d ' ' -f 2 | sed 's/^0*//' | sort -n | uniq | tail -n1) +PM_CNT=$[${MAX} - $MIN + 1] (cat <<EOF |