summaryrefslogtreecommitdiffstats
path: root/support/scripts/graph-build-time
diff options
context:
space:
mode:
authorThomas De Schampheleire <thomas.de_schampheleire@nokia.com>2018-01-02 15:07:23 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-01-02 22:40:09 +0100
commita3f37c53d5b7ecd8ebae4b0baabb66147896302b (patch)
tree623318cac03f711ea745605ac485bd1f8cd5ac93 /support/scripts/graph-build-time
parentd0d04b4c5acebee336c0d429d402f9ac0ba3e1eb (diff)
downloadbuildroot-a3f37c53d5b7ecd8ebae4b0baabb66147896302b.tar.gz
buildroot-a3f37c53d5b7ecd8ebae4b0baabb66147896302b.zip
support/scripts: sort pie charts
Make sure that the pie charts produced by 'graph-build' and 'graph-size' targets are sorted on the size of each piece of the pie. Otherwise, making visual analysis is difficult, as one needs to look at the legends of each piece and do the sorting manually in their head. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/scripts/graph-build-time')
-rwxr-xr-xsupport/scripts/graph-build-time2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time
index 0ba0f2d3a7..9d05f2257a 100755
--- a/support/scripts/graph-build-time
+++ b/support/scripts/graph-build-time
@@ -184,7 +184,7 @@ def pkg_pie_time_per_package(data, output):
labels = []
values = []
other_value = 0
- for p in data:
+ for p in sorted(data, key=lambda p: p.get_duration()):
if p.get_duration() < (total * 0.01):
other_value += p.get_duration()
else:
OpenPOWER on IntegriCloud