From: Randy MacLeod <Randy.MacLeod@windriver.com>
To: <yocto@lists.yoctoproject.org>
Subject: [PATCH yocto-autobuilder-helper] scripts/archive_buildstats.py: copy all buildstats
Date: Wed, 22 Jun 2022 17:12:31 -0400 [thread overview]
Message-ID: <20220622211231.159988-1-Randy.MacLeod@windriver.com> (raw)
As a first pass, collect all the tmp/buildstats logs
using 'cp -a', to enable review and graphing of all builds.
The goal is to understand the trends in the /proc/pressure/{cpu|io}
data that is now gathered as part of the buildstats system.
Signed-off-by: Aryaman Gupta <Aryaman.Gupta@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
scripts/archive_buildstats.py | 27 +++++++++++++++++++++++++++
scripts/run-config | 1 +
2 files changed, 28 insertions(+)
create mode 100755 scripts/archive_buildstats.py
diff --git a/scripts/archive_buildstats.py b/scripts/archive_buildstats.py
new file mode 100755
index 0000000..bdbe9f4
--- /dev/null
+++ b/scripts/archive_buildstats.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+
+import os, sys
+
+def usage():
+ print("Usage: " + sys.argv[0] + " <src> <dest> <target>")
+
+def main():
+ if len(sys.argv) != 4:
+ usage()
+ sys.exit()
+
+ builddir = sys.argv[1]
+ dest = sys.argv[2]
+ target = sys.argv[3]
+
+ bsdir = os.path.join(builddir, "tmp/buildstats")
+ directory = os.path.join(dest, target)
+
+ os.system('mkdir -p ' + directory)
+ # cp -a <path-to-worker-buildstats> <directory>
+ os.system('cp -a ' + builddir + ' ' + directory)
+
+main()
diff --git a/scripts/run-config b/scripts/run-config
index 838847a..953977e 100755
--- a/scripts/run-config
+++ b/scripts/run-config
@@ -334,6 +334,7 @@ elif args.phase == "finish" and args.stepname == "collect-results":
hp.printheader("Running results collection")
runcmd([scriptsdir + "/collect-results", args.builddir, args.results_dir, args.target])
runcmd([scriptsdir + "/summarize_top_output.py", args.results_dir, args.target])
+ runcmd([scriptsdir + "/archive_buildstats.py", args.builddir, args.results_dir, args.target])
sys.exit(0)
if jcfg:
--
2.32.0
next reply other threads:[~2022-06-22 21:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 21:12 Randy MacLeod [this message]
2022-06-23 9:06 ` [yocto] [PATCH yocto-autobuilder-helper] scripts/archive_buildstats.py: copy all buildstats Richard Purdie
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=20220622211231.159988-1-Randy.MacLeod@windriver.com \
--to=randy.macleod@windriver.com \
--cc=yocto@lists.yoctoproject.org \
/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.