From patchwork Sat Aug 17 17:18:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148742 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MZubc6fg"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n394PKDz9sN4 for ; Sun, 18 Aug 2019 03:18:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9649420372; Sat, 17 Aug 2019 17:18:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JJhNEzYu+xyy; Sat, 17 Aug 2019 17:18:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3B29F20530; Sat, 17 Aug 2019 17:18:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 55B731BF402 for ; Sat, 17 Aug 2019 17:18:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5315E20530 for ; Sat, 17 Aug 2019 17:18:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nuHdy599VSLf for ; Sat, 17 Aug 2019 17:18:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by silver.osuosl.org (Postfix) with ESMTPS id 96E9920372 for ; Sat, 17 Aug 2019 17:18:36 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id v19so6549700wmj.5 for ; Sat, 17 Aug 2019 10:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BkX/ht8/ye4sREtYPJsN8ZwBgIGw+1m8+eRgq2QGSI4=; b=MZubc6fg2t+5FW1F0rsUJV09ou7MDsWOwjYqh76U44Ti+FEYz6RF9HwLby808CUwT+ 0721gNNmK+o+/WR0bw8UnifCC6EDaUZu2G6BA9AwPIIuG+QrgsqK8jqFJrPriEAoHA67 qzE5hHQGrD+2euz5N3Np2x1dOPpBNURIqVKUgXBePjZfzUnZLCa4T0G0IakLnbh4t/sK q+DzSwgh0pphpBaIOc8CODppUegcGlY931Q+9ykBurskAtWVZ0XMcBkaPhwxt4q74nsQ nPGhO/zqbkox6rFTKmxn7DHi+HbR4hRZLBfFhq42NbcJemqGdZI32n7mykeHrKtk0Qcm GP5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BkX/ht8/ye4sREtYPJsN8ZwBgIGw+1m8+eRgq2QGSI4=; b=pteS+swQperWc43ugXSP+gyU3x0DzPgFrri2WzN3WJTnzJS1p9pmcO+pHq4CSEIiEj 8HneF8wjRMSSm/nHJJakPJ7iPPh+PixayBWvLxsdypTySvMpVEkspyqOKfe/u+FZB+e8 9AhytQdprUGrtggtuYoU3K4Tm7la7TxUOpNhPT2fUQjlefoK8Wc2w+H3RkTFk6wJpcVP dOGvYvVGvSG+fv2zpYTq2Ik0vr/M6rma4I0MrwCFO0mYUKb9Y28wyW/XSZ54XtdVIJYe lZt69ncFhc+A/dsG41PTMd4xyWSuhhWRH+v2KDtLERUzAKZaxHs49loBvTUYXMT8h37n thxw== X-Gm-Message-State: APjAAAXufkRCciT6P9mvuGUoOMVbbDOahoBXz4FpAvm/pMxcH5bRACh/ GCGyDl2aYS8Q6/vleikJ6GqE/Dcm X-Google-Smtp-Source: APXvYqxKkOM4NfGTDiMcnBvgwSpcvITlqgr6eawtzlbvcOlINiOdal/CijuLkUvp8ML8Rn1Nl5oEwA== X-Received: by 2002:a1c:a8d7:: with SMTP id r206mr12483469wme.47.1566062314796; Sat, 17 Aug 2019 10:18:34 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:34 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:23 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/9] support/graph-size: introduce main() X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" It is nicer overall to have a main() function, like all our other scripts tend to have too. Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- support/scripts/size-stats | 45 +++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/support/scripts/size-stats b/support/scripts/size-stats index 8dfa391e24..bd10fbfb68 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -216,27 +216,32 @@ def gen_packages_csv(pkgsizes, outputf): wr.writerow([pkg, size, "%.1f" % (float(size) / total * 100)]) -parser = argparse.ArgumentParser(description='Draw size statistics graphs') +def main(): + parser = argparse.ArgumentParser(description='Draw size statistics graphs') -parser.add_argument("--builddir", '-i', metavar="BUILDDIR", required=True, - help="Buildroot output directory") -parser.add_argument("--graph", '-g', metavar="GRAPH", - help="Graph output file (.pdf or .png extension)") -parser.add_argument("--file-size-csv", '-f', metavar="FILE_SIZE_CSV", - help="CSV output file with file size statistics") -parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", - help="CSV output file with package size statistics") -args = parser.parse_args() + parser.add_argument("--builddir", '-i', metavar="BUILDDIR", required=True, + help="Buildroot output directory") + parser.add_argument("--graph", '-g', metavar="GRAPH", + help="Graph output file (.pdf or .png extension)") + parser.add_argument("--file-size-csv", '-f', metavar="FILE_SIZE_CSV", + help="CSV output file with file size statistics") + parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", + help="CSV output file with package size statistics") + args = parser.parse_args() -# Find out which package installed what files -pkgdict = build_package_dict(args.builddir) + # Find out which package installed what files + pkgdict = build_package_dict(args.builddir) -# Collect the size installed by each package -pkgsize = build_package_size(pkgdict, args.builddir) + # Collect the size installed by each package + pkgsize = build_package_size(pkgdict, args.builddir) -if args.graph: - draw_graph(pkgsize, args.graph) -if args.file_size_csv: - gen_files_csv(pkgdict, pkgsize, args.file_size_csv) -if args.package_size_csv: - gen_packages_csv(pkgsize, args.package_size_csv) + if args.graph: + draw_graph(pkgsize, args.graph) + if args.file_size_csv: + gen_files_csv(pkgdict, pkgsize, args.file_size_csv) + if args.package_size_csv: + gen_packages_csv(pkgsize, args.package_size_csv) + + +if __name__ == "__main__": + main() From patchwork Sat Aug 17 17:18:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148744 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lugbv5fy"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3J2dvGz9sDQ for ; Sun, 18 Aug 2019 03:18:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0458A21532; Sat, 17 Aug 2019 17:18:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lkbBNDw6eSqJ; Sat, 17 Aug 2019 17:18:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1AB4921539; Sat, 17 Aug 2019 17:18:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9F6591BF402 for ; Sat, 17 Aug 2019 17:18:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9C9C620530 for ; Sat, 17 Aug 2019 17:18:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aVbK7hxDreEO for ; Sat, 17 Aug 2019 17:18:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by silver.osuosl.org (Postfix) with ESMTPS id ECC0720372 for ; Sat, 17 Aug 2019 17:18:37 +0000 (UTC) Received: by mail-wr1-f46.google.com with SMTP id t16so4541188wra.6 for ; Sat, 17 Aug 2019 10:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FHu/eT5pJR4Lj0YyoTnxEYKKMB6KG8S7Tek3kKHLous=; b=lugbv5fyKmyu3zcziJXvTn63WaNQbewoW7p3dzJ6wufnhWPVOtjw7UUjLKvJRG73Zs KlOidq0Jin7OFTuWCIKeEwXBxH/662YJbyAW5yRyd6nqtaAqSLPD3xmRePRloFlsLCWR 7fkry2g+/jAS9lAwTQwQQB1Lwi5FZvLI9DBejBZ1Dfj0vn/mjnQUM8T+MtA/iGTFKGyQ Pys9jKa+yf82YcHSSC8iqsCi7ikV4LkCaPpXm9sQDaUqOWdfDjBglrIPvGD1jBuSawho m2UgPj6dGuIjsGDR41PlPEArb7U3SSzpp7WBgaYG8pIzc6OGaZ1BW78xo/2cU4KqLQhA H2BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FHu/eT5pJR4Lj0YyoTnxEYKKMB6KG8S7Tek3kKHLous=; b=R9s1uhpKfTxVhtjJZKgw3aNU4o0sVG28F2EVt/q2z12rzEHA+000sXAxmRYxk/1Cda IufG3H5pxMy0Jtk1LA25yiKnCIeK1nc7Ee9mvhC0tW4N2e7Ao0it5gf/ZBEWHqeU7zqL /DU4LXFO1j9YgHn5Syv+lzkFHZzEAix9OGDVk2XzTa8syKRlhpdtN3WcNGYCoOUeos+C hscfanEZQuocjpQZrOxB1Nx9JfF3KrLBC8xfRWgaOvzs6sKpdPx7RJvlaSTSrboCslQN ZV6+fqtvnBeLpF/MwEZuWcCX7pEPgMF9UOzSHYpBulbOOGcvuC+cMTxdIwaLOH0IUul/ b5rw== X-Gm-Message-State: APjAAAVG0E/ZmeCk4v+aZDXtOGczrvbxFjaC8n0asOCcDUXyC4yT5VxO 7tIpLAT+81DHkmpDJhrOKtsYKNcd X-Google-Smtp-Source: APXvYqyGBhxr8uPaxSDceSMjA6+8DnL/U0uizjxNzI3DluqWh4qtdkbar8wDWLM+2Bn+MJp8ivXgAQ== X-Received: by 2002:adf:e390:: with SMTP id e16mr6897637wrm.153.1566062316292; Sat, 17 Aug 2019 10:18:36 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:35 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:24 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/9] support/graph-size: don't report "Others" if size is zero X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- support/scripts/size-stats | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/support/scripts/size-stats b/support/scripts/size-stats index bd10fbfb68..398c256e8b 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -137,8 +137,9 @@ def draw_graph(pkgsize, outputf): else: labels.append("%s (%d kB)" % (p, sz / 1000.)) values.append(sz) - labels.append("Other (%d kB)" % (other_value / 1000.)) - values.append(other_value) + if other_value != 0: + labels.append("Other (%d kB)" % (other_value / 1000.)) + values.append(other_value) plt.figure() patches, texts, autotexts = plt.pie(values, labels=labels, From patchwork Sat Aug 17 17:18:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148746 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="q4qK8WA4"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3P3mXkz9sDQ for ; Sun, 18 Aug 2019 03:18:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 96B5D21FF8; Sat, 17 Aug 2019 17:18:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7XPw1Jih2u3p; Sat, 17 Aug 2019 17:18:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id EB9AD2155B; Sat, 17 Aug 2019 17:18:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C954D1BF402 for ; Sat, 17 Aug 2019 17:18:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BE8D48634E for ; Sat, 17 Aug 2019 17:18:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wpvBYmoGY353 for ; Sat, 17 Aug 2019 17:18:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by whitealder.osuosl.org (Postfix) with ESMTPS id B8AA08631D for ; Sat, 17 Aug 2019 17:18:39 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id y8so4536740wrn.10 for ; Sat, 17 Aug 2019 10:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ez1EjgOLRz/sfsnCa+cUNoZNsvGSz+QoReU56c2boOY=; b=q4qK8WA4AaM9ZJ5KzTG1ngTilRFp9lns2FyjjgOrcjeHx0aTFkja3iDTN8lLIL5NNC mMKz8tmKQx26OuTJwoJ0giUx/rsjE/g4B+A3tWsG/GVuFnlxewWkh9NU9O1ihNe09Y4h 8INg2yQ7qWDWtNyddF6nfYZwbc8bzy5aryFCQgyXvUbtLsGL1/PvsZTpaZGrpdMB5rYU GFCsKy5D4TJJUVjQZX+ErNlRK7wdgTEzKGXGJN2LMKYy+j5LUx0WeAYHqAjGn5/s8jXw ZsCIrkJxPOwdYPy4czj4bv9BjKBPzMsi3N2X4fD+coqFQKSsHmc8PyysTZj7KCkRYQbS srYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ez1EjgOLRz/sfsnCa+cUNoZNsvGSz+QoReU56c2boOY=; b=IDLRnnJBmpw0IMNWG6a1QPRRORNuMaDYv8Ac/EtJHIrtSTO/KrdWBVc5iaCwGiazWX oVY4WmvcLb/S0KI4WenFlApzQq9rWakJfrOed+F35q9rf4JbvPZmnG5Va8VwWmEn+wUJ xq2+0bBeHqsW0XCZ2Vu12FEEhoL7LjeIU1JAZp1eTsh6mAs16AkdW3zs6fKHyceu/Dfm MfTGmvaSCy7HrVFSufvuBZfRvlAYMql/iTh34SFV8ylCgPnmBmP8xPNtibKZgtqxr/zG 8dC3ohjROwljDRzaNXjRd6TcRxIlV0tmq3u+FG1G7Aoyty40vShZkkKTrFRqk6sVbfZw VQ/Q== X-Gm-Message-State: APjAAAUdMXoF30sp9CFkjZgKnsLV3LtePxUUXKwv453js6v2US5KPTZt 7EkT3dYIWuLHfrUB2//FOwZbYDRR X-Google-Smtp-Source: APXvYqwsZf4ghtmeMbxJuCFbb3P5xJDIL4ScNKHrAdApjJfAfmdAaTYDB9ptXkuv+LHcO0j39IUrfA== X-Received: by 2002:adf:e801:: with SMTP id o1mr17826540wrm.45.1566062317939; Sat, 17 Aug 2019 10:18:37 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:37 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:25 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/9] support/graph-size: report 'Unkown" after all packages, but before "Others" X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, the "unknown" category may be reproted anywhere, so it does not really stand out when there are a lot of packages in the graph. Move it towards the end, but right before the "other" category, so that it is a bit more visible. Like for Others, don;t report it if its size is zero. Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- support/scripts/size-stats | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/support/scripts/size-stats b/support/scripts/size-stats index 398c256e8b..82258e4606 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -131,12 +131,18 @@ def draw_graph(pkgsize, outputf): labels = [] values = [] other_value = 0 + unknown_value = 0 for (p, sz) in sorted(pkgsize.items(), key=lambda x: x[1]): if sz < (total * 0.01): other_value += sz + elif p == "unknown": + unknown_value = sz else: labels.append("%s (%d kB)" % (p, sz / 1000.)) values.append(sz) + if unknown_value != 0: + labels.append("Unknown (%d kB)" % (unknown_value / 1000.)) + values.append(unknown_value) if other_value != 0: labels.append("Other (%d kB)" % (other_value / 1000.)) values.append(other_value) From patchwork Sat Aug 17 17:18:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148745 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YrdOTlIY"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3K2lySz9sMr for ; Sun, 18 Aug 2019 03:18:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A9F58862DE; Sat, 17 Aug 2019 17:18:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4qeTwopbyCB5; Sat, 17 Aug 2019 17:18:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6EA5D8634E; Sat, 17 Aug 2019 17:18:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E4A181BF402 for ; Sat, 17 Aug 2019 17:18:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DD93621532 for ; Sat, 17 Aug 2019 17:18:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id skz7q5kXOTSB for ; Sat, 17 Aug 2019 17:18:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by silver.osuosl.org (Postfix) with ESMTPS id D502A2151E for ; Sat, 17 Aug 2019 17:18:40 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id t16so4541265wra.6 for ; Sat, 17 Aug 2019 10:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+uD1LNUtYFCdVN4wkzYqnieoNvzkSl/Lv21J5JVQp84=; b=YrdOTlIYq9sR/6uqceeWVoORDkX/lA8G0u0tQQ2mjcXODNlJ8lXD3ScxxAgnxFfmLX lxj3mLJIfOckW4uqvGfAN/+PeDweZp6x3drmmJlEa6Q6T4ypNPxsbd6gZ3ocHqHzPzOY lTwe+nnYruWmjqaqa4+3fKc0Xwt4RheGczrCa54Qwm8zYCk9EegGBI15rI0oXd17GvkJ C0JrajYdG/UnAO7Dn9hMtnLK+wFfp5/qENK27tJMTfaHvXQu94yQgTU3iC/XhX+0shr6 OimZxMQtMyOTZF4qEGHmECcR+Qb5pGvIeKnav4/lCEhM9vwiMCwv6S6FsLbsqQQBwrXr Y0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+uD1LNUtYFCdVN4wkzYqnieoNvzkSl/Lv21J5JVQp84=; b=d1dr4R9jn45M8V0z6sBadyOU3m2qg9dmHob1FOpDLSCJBDLlrqdDJoc3tBj79Ar8Gu HtnPibflWirAs5Pm2XwVEmcVy936BrYvjZqIq5XUY8KjA7Ipl/OTnLHgkTcjjTinLqjE lXtznRbjW6oP0p7Vaj/wL6xekomJXuLvc9CKRGSEUtY40YopeFRSQWVADCsOLSeKt7+g FSExQOIHH/h/gPpNi3bMY5xAJMJUl6+PWeZZTVR+nhT5yA7g1DMIavRKTHLKnknXI5YS 4HPN3QzNdFgNOpy8XMrRLEGxZbwXVaeGP6Me0FbUIAKsXcbmTHonfqg5vFG/+DewCGq2 wb/g== X-Gm-Message-State: APjAAAWS96hjp8hD2vj578zG5/uJd8/YtFVtQRmOe2P4HvR7+jdyWgks L7M9N/eiuIdvhucYBhoX9IXt0GzD X-Google-Smtp-Source: APXvYqzRT4+IR0dDzWq21Y0X5g/rfqdEHOEkBJifpyJD+3ZonwNuZdK8YIYlyhSH6hkn0Ox2Q2TMHQ== X-Received: by 2002:adf:91c2:: with SMTP id 60mr18245127wri.334.1566062319180; Sat, 17 Aug 2019 10:18:39 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:38 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:26 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 5/9] support/graph-size: display human-readable size X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, we forcibly report sizes in multiple of Kilobytes. In some big configurations, the sizes of the system as a whole, as well as that of individual packages, may exceed megabytes, and when some artistic assets get used, even the giagbyte may get exceed. These big sizes are not easy to read when expressed in kilobytes. Additionally, some very small packages might have sizes below the kilobyte (and now we can specify the cut-off grouping size, they may get reported), and thus the size displayed for those would be 0 kB. Add a help function that can format a floating-point size into a string with all the appropriate formatting: - there are at least 3 meaningfull digits visible, i.e. we display "3.14" or "10.4" instead of just "3" or "10", but for big number we don't care about too many precision either, so we report "100" or "1000", not "100.42" or "1000.27"; - the proper SI prefix is appended, if needed. Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- support/scripts/size-stats | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/support/scripts/size-stats b/support/scripts/size-stats index 82258e4606..eb09e0dc60 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -22,6 +22,7 @@ import os.path import argparse import csv import collections +import math try: import matplotlib @@ -127,6 +128,17 @@ def build_package_size(filesdict, builddir): # outputf: output file for the graph # def draw_graph(pkgsize, outputf): + def size2string(sz): + divider = 1000.0 + prefixes = ['', 'k', 'M', 'G', 'T'] + while sz > divider and len(prefixes) > 1: + prefixes = prefixes[1:] + sz = sz/divider + # precision is made so that there are always at least three meaningful + # digits displayed (e.g. '3.14' and '10.4', not just '3' and '10') + precision = int(2-math.floor(math.log10(sz))) if sz < 1000 else 0 + return '{:.{prec}f} {}B'.format(sz, prefixes[0], prec=precision) + total = sum(pkgsize.values()) labels = [] values = [] @@ -138,13 +150,13 @@ def draw_graph(pkgsize, outputf): elif p == "unknown": unknown_value = sz else: - labels.append("%s (%d kB)" % (p, sz / 1000.)) + labels.append("%s (%s)" % (p, size2string(sz))) values.append(sz) if unknown_value != 0: - labels.append("Unknown (%d kB)" % (unknown_value / 1000.)) + labels.append("Unknown (%s)" % (size2string(unknown_value))) values.append(unknown_value) if other_value != 0: - labels.append("Other (%d kB)" % (other_value / 1000.)) + labels.append("Other (%s)" % (size2string(other_value))) values.append(other_value) plt.figure() @@ -158,7 +170,7 @@ def draw_graph(pkgsize, outputf): plt.setp(texts, fontproperties=proptease) plt.suptitle("Filesystem size per package", fontsize=18, y=.97) - plt.title("Total filesystem size: %d kB" % (total / 1000.), fontsize=10, + plt.title("Total filesystem size: %s" % (size2string(total)), fontsize=10, y=.96) plt.savefig(outputf) From patchwork Sat Aug 17 17:18:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148749 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hMKrl8YO"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3k6P1Mz9sDQ for ; Sun, 18 Aug 2019 03:19:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1494421539; Sat, 17 Aug 2019 17:19:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GempiD1+6DNJ; Sat, 17 Aug 2019 17:19:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 730CA21F65; Sat, 17 Aug 2019 17:18:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 35A051BF402 for ; Sat, 17 Aug 2019 17:18:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 243A221FF8 for ; Sat, 17 Aug 2019 17:18:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lj54TLPKfzKu for ; Sat, 17 Aug 2019 17:18:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by silver.osuosl.org (Postfix) with ESMTPS id 21D8121552 for ; Sat, 17 Aug 2019 17:18:43 +0000 (UTC) Received: by mail-wr1-f43.google.com with SMTP id z1so4530413wru.13 for ; Sat, 17 Aug 2019 10:18:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ztk8YkZ3yjgBlSw5SJltzcVMWa+h5V71rlxgG+zFHpo=; b=hMKrl8YOPFq9/9znlkEkg5hHO4PPhO6pfAzO75BczB4hC04q75fuEOPjn1DQAH+Uic j0VFKY0fe7o7AVca/LjZ/w5mb4BXj5/ox2cZQNzXcV4sm1s65Y+nvZRz02LNMqZ4giA9 axvQcrSnfx3LkZCGfwA95DfF09sRq+CvAzBOYx1sk6EHzc6rmJGcO5jHSgoFmJ/wce4y 2tjehUT44VQGntk0i5bkBhkcuReBEVJPA0CfudCAxmmKyOXOjlXDRsbro9DZUXYl2zCN I2TjwAyc7M/uEdN9SXpRJiJdnMDs+ilYU5wiOP9+n/zf3CFvn9i+Zx35CH0W1tqcIBpj S1Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ztk8YkZ3yjgBlSw5SJltzcVMWa+h5V71rlxgG+zFHpo=; b=taKv2WDLi+t0RQFbkffWokMr+7tFUZiz8Y4gQ53feOLTyH8jk2eWjb/KusSWpV5/5P 8uALaRT7Px4SXSPWOz+3iHRfk/bMswiwejmDj2g6UjrjrvXW/8nfhT5WVNfiPlfGz1tg 0qPU2guiEtvyZsIA5MMEXYCzWNnFFXht4aKU4YvpZDJevrwUb6I0DfymAIL3PHLKzES5 jAU2Pbmy2ClXYH0fMoIgEOGy+D68IITQFE5jwKVnNkp18kRe9QGEuTrh0L021wXWeLeI dWT0LM3EogpjEBd9U+l8cMf6U1tah+b0ILVMV/rA+Ou14imU0PpesCE8/oWRa65DxHRG yYOw== X-Gm-Message-State: APjAAAWu9f2+sfWLI3wZxt6raxXeuFVfiDMM4nthpiK42S/cRXuS4C6N GemkcZmzBf1TCdexP9nDQHO4c8d9 X-Google-Smtp-Source: APXvYqxBRQHmSTBS7/ME3CZGuEYJCCrWvOpmVb+CMqDdSWH5+kjZtGWh6M4ALyalqLmB0VqUZBglVQ== X-Received: by 2002:a5d:6b84:: with SMTP id n4mr17502390wrx.118.1566062321391; Sat, 17 Aug 2019 10:18:41 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:41 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:27 +0200 Message-Id: <109be7cab508c2cc454c5294a86c5ac0cbb5d84b.1566062299.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 6/9] support/graph-size: add option to change percentage to group in Others X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, we group packages that contribute less then 1%, into the "Other" category. However, in some cases, there can be a lot of very comparatively small packages, and they may not exceed this limit, and so only the "Others" category would be displayed, which is not nice. Conversely, if there are a lot of packages, most of which only so slightly exceeding this limit, then we get all of them in the graph, which is not nice either. Add a way for the developers to pass a different cut-off limit. As for the dependency graph which has BR2_GRAPH_DEPS_OPTS, add the environment variable BR2_GRAPH_SIZE_OPTS to carry those extra option (in preparation for more to come, later). Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- Makefile | 3 ++- docs/manual/common-usage.txt | 12 ++++++++++++ support/scripts/size-stats | 19 +++++++++++++++---- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 406efd1ab6..e4aa074e4a 100644 --- a/Makefile +++ b/Makefile @@ -892,7 +892,8 @@ graph-size: $(Q)$(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \ --graph $(GRAPHS_DIR)/graph-size.$(BR_GRAPH_OUT) \ --file-size-csv $(GRAPHS_DIR)/file-size-stats.csv \ - --package-size-csv $(GRAPHS_DIR)/package-size-stats.csv + --package-size-csv $(GRAPHS_DIR)/package-size-stats.csv \ + $(BR2_GRAPH_SIZE_OPTS) .PHONY: check-dependencies check-dependencies: diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt index a36301afd5..7e78d350d4 100644 --- a/docs/manual/common-usage.txt +++ b/docs/manual/common-usage.txt @@ -102,6 +102,8 @@ to +make+ or set in the environment: xref:graph-depends[] for the accepted options * +BR2_GRAPH_DOT_OPTS+ is passed verbatim as options to the +dot+ utility to draw the dependency graph. +* +BR2_GRAPH_SIZE_OPTS+ to pass extra options to the size graph; see + xref:graph-size[] for the acepted options An example that uses config files located in the toplevel directory and in your $HOME: @@ -278,6 +280,7 @@ only other format supported is PNG: BR2_GRAPH_OUT=png make graph-build ---------------- +[[graph-size]] === Graphing the filesystem size contribution of packages When your target system grows, it is sometimes useful to understand @@ -314,6 +317,15 @@ Just like for the duration graph, a +BR2_GRAPH_OUT+ environment variable is supported to adjust the output file format. See xref:graph-depends[] for details about this environment variable. +Additionally, one may set the environment variable +BR2_GRAPH_SIZE_OPTS+ +to further control the generated graph. Accepted options are: + +* `--size-limit X`, `-l X`, will group all packages which individual + contribution is below `X` percent, to a single entry labelled _Others_ + in the graph. By default, `X=0.01`, which means packages each + contributing less than 1% are grouped under _Others_. Accepted values + are in the range `[0.0..1.0]`. + .Note The collected filesystem size data is only meaningful after a complete clean rebuild. Be sure to run +make clean all+ before using +make diff --git a/support/scripts/size-stats b/support/scripts/size-stats index eb09e0dc60..3454acd681 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -33,8 +33,11 @@ except ImportError: sys.stderr.write("You need python-matplotlib to generate the size graph\n") exit(1) -colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', - '#0068b5', '#f28e00', '#940084', '#97c000'] + +class Config(): + size_limit = 0.01 + colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', + '#0068b5', '#f28e00', '#940084', '#97c000'] # @@ -145,7 +148,7 @@ def draw_graph(pkgsize, outputf): other_value = 0 unknown_value = 0 for (p, sz) in sorted(pkgsize.items(), key=lambda x: x[1]): - if sz < (total * 0.01): + if sz < (total * Config.size_limit): other_value += sz elif p == "unknown": unknown_value = sz @@ -162,7 +165,7 @@ def draw_graph(pkgsize, outputf): plt.figure() patches, texts, autotexts = plt.pie(values, labels=labels, autopct='%1.1f%%', shadow=True, - colors=colors) + colors=Config.colors) # Reduce text size proptease = fm.FontProperties() proptease.set_size('xx-small') @@ -246,8 +249,16 @@ def main(): help="CSV output file with file size statistics") parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", help="CSV output file with package size statistics") + parser.add_argument("--size-limit", "-l", type=float, + help='Under this size ratio, files are accounted to ' + + 'the generic "Other" package. Default: 0.01 (1%%)') args = parser.parse_args() + if args.size_limit is not None: + if args.size_limit < 0.0 or args.size_limit > 1.0: + raise ValueError("--size-limit must be in [0.0..1.0]") + Config.size_limit = args.size_limit + # Find out which package installed what files pkgdict = build_package_dict(args.builddir) From patchwork Sat Aug 17 17:18:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148743 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UmYXtZ7W"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3G3xn8z9sDQ for ; Sun, 18 Aug 2019 03:18:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1844787A2E; Sat, 17 Aug 2019 17:18:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GI5H5wc0eVoy; Sat, 17 Aug 2019 17:18:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6513687994; Sat, 17 Aug 2019 17:18:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 4A2CA1BF402 for ; Sat, 17 Aug 2019 17:18:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 441DB87934 for ; Sat, 17 Aug 2019 17:18:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0KcmTgzXYRU6 for ; Sat, 17 Aug 2019 17:18:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by hemlock.osuosl.org (Postfix) with ESMTPS id 62A7E878AC for ; Sat, 17 Aug 2019 17:18:45 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id i63so6531034wmg.4 for ; Sat, 17 Aug 2019 10:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TS5udvl9UremdoH9y/xFmrvPEM9vc4q6jv5IMVM4ZHo=; b=UmYXtZ7WbDyYobcuCa/1L5nNN0c6gQSSFvGnHBahsNW+VvmXlOv5SjM/DcjUuXFuVq NiOQSb7KfqgBPtrV2z99OdKtjkfQ+fW01q7WFJNtXdwCmsZ78DVw1ppd2pS5xcb78Eef hFQB7zYRaL0WYpqTsSoflN1I5iZLpbDv22hYwnr6vR/fAXw8hIJPkHrJfifx1cRaWSIE Y/ZkFHJ6+PdJP8sL25chgl2MfZBqXxizGibURkA/CLxah7/sc1gxO1cJAoFIzstZO8HU PZhvRj5n0Ehp/dHBpUxUXFztr7GH7adI9iwS6RjKaJrwGjkpl5nTdIBFYHUKU/KgW1/u Twzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TS5udvl9UremdoH9y/xFmrvPEM9vc4q6jv5IMVM4ZHo=; b=qK0wMkkqPpzkOaYO3G9ljoVfOJmzAhpSt3M8489WYbzkIpR3Q+3jls92nc8Gor67D7 i+MTXZly/nyor9faqH40gD8ivBinVg0jlIZ4VK9DHUgZqwv43aKI7U98XASqfUaaqPDi 1OpNtBM6K1yhMXSUVws/Xh5UxGkY6nqxYLi+WiB6tIxSmpW/FJ+sXwJ0TcJKQETfbqOi dpMTur/AKTk5WifMz4vMagIkHAVYYdLTUHeqC60Wbc1u7YLeHRH4zSQGqQ9JaMr+2C4f NE74vq1uZDiZESsWez/K1JsJS6iJ8jit5Qn3segxLXLV5Q8qvzZ5l2L5yiGiz23ELyE1 xHUg== X-Gm-Message-State: APjAAAWd8DTf5jvMQ3BrdcQOWSZOGFEH9KdtlarC2kzd7wif6Yz/1QHT BnyAx1/O348i2OQLBK/zs8dpijR0 X-Google-Smtp-Source: APXvYqxwn8zdSCqrml9PqtS6GITvYolEQKX7JjB94NwDMcoJI2C2MbxutkY9wo7UA6i4SyW+rZsGwA== X-Received: by 2002:a05:600c:254a:: with SMTP id e10mr13029698wma.113.1566062323532; Sat, 17 Aug 2019 10:18:43 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:43 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:28 +0200 Message-Id: <7d974d2d24f11c454e59d76f5b22d364a0ed71e1.1566062299.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 7/9] support/graph-size: add option to report size with IEC prefixes X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When dealing with embedded devices, storage is more often than not some kind of flash device, on which the memory is usually counted as powers of 1024 instead of powers of 1000. As such, people may prefer reports using IEC prefixes [0] instead of the SI prefixes. Add an option to that effect. We use argparse's ability to use custom actions [1] [2], to provide a set of options that act on a boolean, but has a single help entry and internally ensures consistency of the settings. We could have been using the more conventional store_true/stor_false actions instead, but that would have meant either two help entries, one for each set of options, and/or some logic after parse_args() to check the validity of the settings. [0] https://en.wikipedia.org/wiki/Binary_prefix [1] https://docs.python.org/2/library/argparse.html#action [2] https://docs.python.org/2/library/argparse.html#argparse.Action Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- docs/manual/common-usage.txt | 3 +++ support/scripts/size-stats | 29 +++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt index 7e78d350d4..5653e85e12 100644 --- a/docs/manual/common-usage.txt +++ b/docs/manual/common-usage.txt @@ -326,6 +326,9 @@ to further control the generated graph. Accepted options are: contributing less than 1% are grouped under _Others_. Accepted values are in the range `[0.0..1.0]`. +* `--iec`, `--binary`, `--si`, `--decimal`, to use IEC (binary, powers + of 1024) or SI (decimal, powers of 1000; the default) prefixes. + .Note The collected filesystem size data is only meaningful after a complete clean rebuild. Be sure to run +make clean all+ before using +make diff --git a/support/scripts/size-stats b/support/scripts/size-stats index 3454acd681..5bf0ee6e95 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -35,6 +35,7 @@ except ImportError: class Config(): + iec = False size_limit = 0.01 colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', '#0068b5', '#f28e00', '#940084', '#97c000'] @@ -132,8 +133,12 @@ def build_package_size(filesdict, builddir): # def draw_graph(pkgsize, outputf): def size2string(sz): - divider = 1000.0 - prefixes = ['', 'k', 'M', 'G', 'T'] + if Config.iec: + divider = 1024.0 + prefixes = ['', 'Ki', 'Mi', 'Gi', 'Ti'] + else: + divider = 1000.0 + prefixes = ['', 'k', 'M', 'G', 'T'] while sz > divider and len(prefixes) > 1: prefixes = prefixes[1:] sz = sz/divider @@ -238,6 +243,21 @@ def gen_packages_csv(pkgsizes, outputf): wr.writerow([pkg, size, "%.1f" % (float(size) / total * 100)]) +# +# Our special action for --iec, --binary, --si, --decimal +# +class PrefixAction(argparse.Action): + def __init__(self, option_strings, dest, **kwargs): + for key in ["type", "nargs"]: + if key in kwargs: + raise ValueError('"{}" not allowed'.format(key)) + super(PrefixAction, self).__init__(option_strings, dest, nargs=0, + type=bool, **kwargs) + + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, self.dest, option_string in ["--iec", "--binary"]) + + def main(): parser = argparse.ArgumentParser(description='Draw size statistics graphs') @@ -249,11 +269,16 @@ def main(): help="CSV output file with file size statistics") parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", help="CSV output file with package size statistics") + parser.add_argument("--iec", "--binary", "--si", "--decimal", + action=PrefixAction, + help="Use IEC (binary, powers of 1024) or SI (decimal, " + "powers of 1000, the default) prefixes") parser.add_argument("--size-limit", "-l", type=float, help='Under this size ratio, files are accounted to ' + 'the generic "Other" package. Default: 0.01 (1%%)') args = parser.parse_args() + Config.iec = args.iec if args.size_limit is not None: if args.size_limit < 0.0 or args.size_limit > 1.0: raise ValueError("--size-limit must be in [0.0..1.0]") From patchwork Sat Aug 17 17:18:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148748 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iNuVkc5g"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3Y4nXYz9sMr for ; Sun, 18 Aug 2019 03:19:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DD23A21F6F; Sat, 17 Aug 2019 17:19:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eLZbBFIuDd-1; Sat, 17 Aug 2019 17:18:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3E6962156F; Sat, 17 Aug 2019 17:18:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 5E6071BF402 for ; Sat, 17 Aug 2019 17:18:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4FD50879FC for ; Sat, 17 Aug 2019 17:18:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MH56My-kssNG for ; Sat, 17 Aug 2019 17:18:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0DDAA878AC for ; Sat, 17 Aug 2019 17:18:47 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id 207so6468720wma.1 for ; Sat, 17 Aug 2019 10:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uy96QoFpvopE7i04l+OQRDQG7HqqDcyqboq43oWE4E0=; b=iNuVkc5gthVeQmTAQicMmuE6nh9glUe6iGuPAFnIhexdS2MEs0zGbHDsvVGSYGHfgu OCcQqQ2KThKlYC0uGqBFyY1M76Ysat5gkVye4gp51DfUWtE0gd933kJ0EJr+jvj6Df3V TBJSn+GMP+nPFwZL3gIsAQ8Ko+SvjHrlPRqa8lE0OpiHojFH19DkP/3Zfhzif+/0rufa rXVW9RgjBqKGFWkInjgcXfrh3iw13BV8j90YLVwlq8kGit51bgXz7zVEA3KCy/IEYVSG ZxVlkO5AgIROUNkjhdMc9vE5eAWiOeFP2H847WN9mo5vG1d2aI8u6K98gvtRnGgqvUBT 1qfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Uy96QoFpvopE7i04l+OQRDQG7HqqDcyqboq43oWE4E0=; b=tN2K9zjMz0Pne6qKfZH3PzY/OKfLn1rvUe8Xd7/eWEgoe7R+eFrMcp3Y4ATTQp1IGk lIkkkxh6cGMG9xvCs9hMV/s5jCOqU7h0WG/ef8SudwNRSXznlJ5zhTU0G7mpqJrJZayR ynShc8vQwG3PExGPNzJsY+3GklQQ3QC1wi1cSjmyCRV+myiz7eskN8o7efIzwjEov2HB LbftRQ1xb8VYlFACSQxuct6t7FDdzq4uiSzSzuH05t/wLR5BsAkNUOKa+IFlBbt0kryk yyXmkBvM+yIZFM9I8WOshOuT7OMY/tl9BqEAW0pyB7Kxbto0AzyZBiQ8eC/NESQxdFCG GMHw== X-Gm-Message-State: APjAAAXnqsN8BoHc5JbzBqcBAhiNrekOaSPbC8M87T1qGVOdCgmII/h8 J0sxayPUvykm53FWRRTYOQR6JY7k X-Google-Smtp-Source: APXvYqwrgKQFcZYYuNXF4YEHu+nSnQo91COAWi1rVLt8P5dQpJef8qnmaQiLSRGldfKHRP/w1dCBBA== X-Received: by 2002:a1c:9889:: with SMTP id a131mr11534194wme.22.1566062325330; Sat, 17 Aug 2019 10:18:45 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:44 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:29 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 8/9] support/graph-size: add option to sort packages in reverse size order X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, the packages are sorted smallest first, and biggest last (with unknown and others second-to-last and last, resp.). Add an option to invert the ordering (but keeping unknown and others at their current positions). This has the nice side effect that we can now control the colours assigned to the biggest package(s), as the colours are cycled from the first to the last. Currently, the biggest packages gets a redish colour, which is appropriate, but the second gets a greenish one, which is not as appropriate (but changing that can come later). Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- docs/manual/common-usage.txt | 3 +++ support/scripts/size-stats | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt index 5653e85e12..a87980d4a2 100644 --- a/docs/manual/common-usage.txt +++ b/docs/manual/common-usage.txt @@ -329,6 +329,9 @@ to further control the generated graph. Accepted options are: * `--iec`, `--binary`, `--si`, `--decimal`, to use IEC (binary, powers of 1024) or SI (decimal, powers of 1000; the default) prefixes. +* `--biggest-first`, to sort packages in decreasing size order, rather + than in increasing size order. + .Note The collected filesystem size data is only meaningful after a complete clean rebuild. Be sure to run +make clean all+ before using +make diff --git a/support/scripts/size-stats b/support/scripts/size-stats index 5bf0ee6e95..f6b8e6644d 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -35,6 +35,7 @@ except ImportError: class Config(): + biggest_first = False iec = False size_limit = 0.01 colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', @@ -152,7 +153,8 @@ def draw_graph(pkgsize, outputf): values = [] other_value = 0 unknown_value = 0 - for (p, sz) in sorted(pkgsize.items(), key=lambda x: x[1]): + for (p, sz) in sorted(pkgsize.items(), key=lambda x: x[1], + reverse=Config.biggest_first): if sz < (total * Config.size_limit): other_value += sz elif p == "unknown": @@ -269,6 +271,9 @@ def main(): help="CSV output file with file size statistics") parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", help="CSV output file with package size statistics") + parser.add_argument("--biggest-first", action='store_true', + help="Sort packages in decreasing size order, " + + "rather than in increasing size order") parser.add_argument("--iec", "--binary", "--si", "--decimal", action=PrefixAction, help="Use IEC (binary, powers of 1024) or SI (decimal, " @@ -278,6 +283,7 @@ def main(): 'the generic "Other" package. Default: 0.01 (1%%)') args = parser.parse_args() + Config.biggest_first = args.biggest_first Config.iec = args.iec if args.size_limit is not None: if args.size_limit < 0.0 or args.size_limit > 1.0: From patchwork Sat Aug 17 17:18:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148747 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RoYWj4RT"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 469n3Y20Ryz9sDQ for ; Sun, 18 Aug 2019 03:19:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B57582156C; Sat, 17 Aug 2019 17:19:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V5w196Luy2vw; Sat, 17 Aug 2019 17:18:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7A3CD21552; Sat, 17 Aug 2019 17:18:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 804541BF956 for ; Sat, 17 Aug 2019 17:18:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 75362859CF for ; Sat, 17 Aug 2019 17:18:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SQY5LmD90_Tr for ; Sat, 17 Aug 2019 17:18:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A7DC38598E for ; Sat, 17 Aug 2019 17:18:48 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id z1so4530547wru.13 for ; Sat, 17 Aug 2019 10:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2+6KQmud6pTcnlUAcuOshh//HiA7ITo8PclqmkTx67E=; b=RoYWj4RTcCG/8BXUcs4WnYC2FciP0Uh+GJehQBGyv5ASGes00a3qz8P+gAigHvfknC BI/ZRQzJwDKhCC3nJWyz0zxt5arlqs1U/IlrtocnatFEMsoNW17xkiKt1BIAKh8H8LWa HM2zOvqws6hMmgCjh5+7AHe97HxzJIy4+NAVw2b9H7cwUgztAwVia793/y1NUtLJtveG Sr5yobqsA5UCIsCrsSqti3LZAoXYsMZcbncB7penRKeKZeGsoa9BFXojl8l+VSgu6ISF CKKvuvJuF3Z1CfvZ2onnhtwIin3KOfLDZ+loPiA9SAZnsBmgXQb745vkmjQp6BuwTl8u aELw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2+6KQmud6pTcnlUAcuOshh//HiA7ITo8PclqmkTx67E=; b=DWXpzJHSk6BmU4eWMHGixyvllXuCJXSNl5GTO5+5RUHxmjo/S/xKEFCoF3Bhy1A4yN j6u67xaAtgdJSYGGwg+MG4ZmP3pRSmd7N1eJXxWRyUpGr3w5VUQK4CRG2AR9SPOWvBOv ouoIfVKTmPlxUxlTesgKVSE+CbUjviY28mto5da8eBOyUc94R6nEeKUVgv2fujnCxXOX 0aHqgKWlNiCcq5NWZ3VPgZqke1G36NV7xfV1uwZT/yY/AXjO/sdWEP0mz/4uw0dQv2fx Ak4YeES57r2yOXYmcmwMdUn/cKpObUtdXt85jb5AiJeHyEZS4C5kNsv42bDnEnNdg7Nj c5Ag== X-Gm-Message-State: APjAAAVC/EmbOWm+nFfyDoaPYXaK7E98le2OukN8x2HpA4jd60PDqI46 IykL/YGmDoYG/k8ASDvS6n4QRAJR X-Google-Smtp-Source: APXvYqzFbshRD0lLZQATpi60GUFCeNDr+NBdJ3Xv+CtZUiMZhJES0VcTvVySVZl79fDepKxImNtAnw== X-Received: by 2002:adf:d187:: with SMTP id v7mr6889294wrc.33.1566062326958; Sat, 17 Aug 2019 10:18:46 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:46 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:30 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 9/9] support/graph-size: reorder colours assigned to sizes X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Now that we can order packages from biggest to smallest, it makes sense to assign the most aggressive colours to the biggest packages. As such, reorder the current colours so that we have, in order: - red-ish - orange-ish - yellow-ish - purple-ish - eggplant-ish (is that even a colour? :-] ) - some-indeterminate-blue-ish - dark-green-ish - light-green-ish For the previous, smallest-first ordering, it does not matter much what the ordering is: the actual colours are still somewhat-unpredictably assigned to packages, depending on the cut-off limit... Signed-off-by: Yann E. MORIN Cc: Thomas De Schampheleire --- support/scripts/size-stats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/scripts/size-stats b/support/scripts/size-stats index f6b8e6644d..9cb8a33118 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -38,8 +38,8 @@ class Config(): biggest_first = False iec = False size_limit = 0.01 - colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', - '#0068b5', '#f28e00', '#940084', '#97c000'] + colors = ['#e60004', '#f28e00', '#ffed00', '#940084', + '#2e1d86', '#0068b5', '#009836', '#97c000'] #