From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] support/scripts: add size-stats-compare script
Date: Mon, 1 Feb 2016 15:25:08 +0100 [thread overview]
Message-ID: <20160201152508.45575c43@free-electrons.com> (raw)
In-Reply-To: <1453207433-32589-2-git-send-email-patrickdepinguin@gmail.com>
Thomas,
On Tue, 19 Jan 2016 13:43:53 +0100, Thomas De Schampheleire wrote:
> From: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> Leverage the CSV files produces by size-stats (make graph-size) to allow
> for a comparison of rootfs size between two different buildroot
> compilations.
>
> The script takes the file-size CSV files of two compilations as input, and
> produces a textual report of the differences per package.
> Using the -d/--detail flag, the report will show the file size changes
> instead of package size changes.
> The -t/--threshold option allows to ignore file size differences smaller
> or equal than the given threshold (in bytes).
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
> ---
> docs/manual/common-usage.txt | 10 +++
> support/scripts/size-stats-compare | 129 +++++++++++++++++++++++++++++++++++++
> 2 files changed, 139 insertions(+)
> create mode 100755 support/scripts/size-stats-compare
I tested your patch, overall looks good to me, but I have two comments:
(1) I find the order of the arguments for the two CSV files to be
confusing. If you have a "before" situation, and then an "after"
situation you want to compare, you need to call:
size-stats-compare after-situation.csv before-situation.csv
Which isn't very intuitive nor matching what "diff" is doing for
example. So I would suggest to invert those two arguments. And in
the code, instead of having "sizes" and "other_sizes", use
something more explicit like "before_sizes", "after_sizes", or
"first_sizes", "second_sizes", etc.
(2) For the output, I would rather see a single table, maybe looking
more or less like:
1032987 foobar
289792 added strace
65576 busybox
0 skeleton
0 toolchain-external
0 initscripts
-68692 removed zlib
---- ----- -----
292908 TOTAL
(Numbers are completely made up)
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-02-01 14:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 12:43 [Buildroot] [PATCH v2 1/2] manual: minor fixes in the graph-size documentation Thomas De Schampheleire
2016-01-19 12:43 ` [Buildroot] [PATCH v2 2/2] support/scripts: add size-stats-compare script Thomas De Schampheleire
2016-02-01 14:25 ` Thomas Petazzoni [this message]
2016-01-19 14:04 ` [Buildroot] [PATCH v2 1/2] manual: minor fixes in the graph-size documentation Thomas Petazzoni
2016-02-01 13:27 ` Thomas Petazzoni
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=20160201152508.45575c43@free-electrons.com \
--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