All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 2015.08 2/4] support/scripts: add size-stats script
Date: Sat, 11 Jul 2015 13:46:35 +0200	[thread overview]
Message-ID: <55A1021B.8060200@openwide.fr> (raw)
In-Reply-To: <CANn-YGSgXy4fTJtw3mJyFF-4zkWbBh_hg_qWNLcFu5cdjk3XbA@mail.gmail.com>

Hi Clayton, Thomas, all

Le 03/06/2015 17:50, Clayton Shotwell a ?crit :
> Thomas,
> 
> On Mon, May 25, 2015 at 4:56 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> This new script uses the data collected by the step_pkg_size
>> instrumentation hook to generate a pie chart of the size contribution
>> of each package to the target root filesystem, and two CSV files with
>> statistics about the package size and file size. To achieve this, it
>> looks at each file in $(TARGET_DIR), and using the
>> packages-file-list.txt information collected by the step_pkg_size
>> hook, it determines to which package the file belongs. It is therefore
>> able to give the size installed by each package.
>>
>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> ---
>>  support/scripts/size-stats | 238 +++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 238 insertions(+)
>>  create mode 100755 support/scripts/size-stats
>>
>> diff --git a/support/scripts/size-stats b/support/scripts/size-stats
>> new file mode 100755
>> index 0000000..48a64cd
>> --- /dev/null
>> +++ b/support/scripts/size-stats
> 
>> +import sys
>> +import os
>> +import os.path
>> +import argparse
>> +import csv
>> +import collections
>> +
>> +try:
> 
> Would it be possible to add in the following lines here to ensure the
> graphing does not try to connect to an X-server?
> 
> import matplotlib
> matplotlib.use('Agg')
> 
> I ran into an issue testing this on my setup where I ssh into my build
> server using screen. I found this solution on stack overflow at the
> following link.
> 
> http://stackoverflow.com/questions/4706451/how-to-save-a-figure-remotely-with-pylab/4706614#4706614

With Samuel, we are ok to import matplitlib entirely to ensure that it doesn't
try to connect to X-server.
The overhead seems negligible, I not able to see any difference with or without
import matplotlib.

Best regards,
Romain Naour

> 
>> +    import matplotlib.font_manager as fm
>> +    import matplotlib.pyplot as plt
>> +except ImportError:
>> +    sys.stderr.write("You need python-matplotlib to generate the size graph\n")
>> +    exit(1)
> 
> Thanks,
> Clayton
> 
> Clayton Shotwell
> Senior Software Engineer, Rockwell Collins
> clayton.shotwell at rockwellcollins.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

  reply	other threads:[~2015-07-11 11:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 21:56 [Buildroot] [PATCH v4 2015.08 0/4] Generate package size statistics Thomas Petazzoni
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 1/4] pkg-generic: add step_pkg_size global instrumentation hook Thomas Petazzoni
2015-05-28  3:29   ` Ryan Barnett
2015-07-11 10:46   ` Romain Naour
2015-07-11 11:09     ` Thomas Petazzoni
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 2/4] support/scripts: add size-stats script Thomas Petazzoni
2015-05-28  3:18   ` Ryan Barnett
2015-05-28 14:55     ` Matthew Weber
2015-09-02 21:08     ` Thomas Petazzoni
2015-06-03 15:50   ` Clayton Shotwell
2015-07-11 11:46     ` Romain Naour [this message]
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 3/4] Makefile: implement a size-stats target Thomas Petazzoni
2015-05-28  3:32   ` Ryan Barnett
2015-08-20 12:42   ` Ryan Barnett
2015-08-20 20:43     ` Thomas Petazzoni
2015-08-21 14:07       ` Ryan Barnett
2015-08-23 14:46         ` Thomas Petazzoni
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 4/4] docs/manual: add section about size graphing Thomas Petazzoni
2015-05-28  3:42   ` Ryan Barnett
2015-07-30 21:54 ` [Buildroot] [PATCH v4 2015.08 0/4] Generate package size statistics Ryan Barnett

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=55A1021B.8060200@openwide.fr \
    --to=romain.naour@openwide.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.