Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] graph-build-time: generate graphs based on timing data
Date: Fri, 27 Dec 2013 19:49:50 +0100	[thread overview]
Message-ID: <20131227194950.0450b9af@skate> (raw)
In-Reply-To: <1388168189-5713-1-git-send-email-yann.morin.1998@free.fr>

Dear Yann E. MORIN,

On Fri, 27 Dec 2013 19:16:29 +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> 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 <thomas.petazzoni@free-electrons.com>
> [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" <yann.morin.1998@free.fr>
> ---
> 
> 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

  parent reply	other threads:[~2013-12-27 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27 18:16 [Buildroot] [PATCH] graph-build-time: generate graphs based on timing data Yann E. MORIN
2013-12-27 18:21 ` Yann E. MORIN
2013-12-27 18:49 ` Thomas Petazzoni [this message]
2013-12-27 19:34   ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131227194950.0450b9af@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox