From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Fri, 27 Dec 2013 19:49:50 +0100 Subject: [Buildroot] [PATCH] graph-build-time: generate graphs based on timing data In-Reply-To: <1388168189-5713-1-git-send-email-yann.morin.1998@free.fr> References: <1388168189-5713-1-git-send-email-yann.morin.1998@free.fr> Message-ID: <20131227194950.0450b9af@skate> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Dear Yann E. MORIN, On Fri, 27 Dec 2013 19:16:29 +0100, Yann E. MORIN wrote: > From: "Yann E. MORIN" > > This script generates graphs of packages build time, from the timing > data generated by Buildroot in the $(O)/build-time.log file. > > Example usage: > > cat $(O)/build-time.data | \ > ./support/scripts/graph-build-time \ > --type=histogram --output=foobar.pdf Just like the dependency graph tool, I'm wondering if we shouldn't try to integrate this as a make target, to give it more visibility. This can of course be done at a later stage. > Three graph types are available : > > * histogram, which creates an histogram of the build time for each > package, decomposed by each step (extract, patch, configure, > etc.). The order in which the packages are shown is > configurable: by package name, by build order, or by duration > order. See the --order option. > > * pie-packages, which creates a pie chart of the build time of > each package (without decomposition in steps). Packages that > contributed to less than 1% of the overall build time are all > grouped together in an "Other" entry. > > * pie-steps, which creates a pie chart of the time spent globally > on each step (extract, patch, configure, etc...) > > The default is to generate an histogram ordered by package name. > > Signed-off-by: Thomas Petazzoni > [yann.morin.1998 at free.fr: adapt to the format of the step-hooks build-time.log, > add sort order by name] > Signed-off-by: "Yann E. MORIN" > --- > > So, this is a respin of Thomas' scripts from more than two years ago, that > I adapted to the new build-time.log format we now have with step-hooks. > > I have put a few graphs on-line: > http://ymorin.is-a-geek.org/download/tmp/buildroot/graphs/matplotlib/ > > For comparisson, some I made with gnuplot: > http://ymorin.is-a-geek.org/download/tmp/buildroot/graphs/gnuplot/ > > To be honnest, I prefer the graphs made with gnuplot, but it is mostly > because of the colors (hey, Thomas, are you colorblind? ;-p) I'm not colorblind. To me, the histogram colors look nice (they are defined in the script). The colors for the pie charts are horrible, but I believe they are automatically chosen by matplotlib, no? Feel free to improve the colors :) > But since this script is cleaner (much, much cleaner) than what I was able > to get with gnuplot, I won't even try to submit my gnuplot scripts... :-/ > > --- > support/scripts/graph-build-time | 273 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 273 insertions(+) > create mode 100755 support/scripts/graph-build-time Thanks a lot for submitting this! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com