Skip to contentSkip to conversation

summarize_top_output.py: add script, use it and publish summary

PATCH Superseded [email protected] 1 participant 1 message Jun 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 summarize_top_output.py: add script, use it and publish summary

summarize_top_output.py is used to summarize the top output that is captured during autobuilder intermittent failures.

Use the script to summarize the host top output and publish the summary that is created instead of the raw logfile.

---
 scripts/collect-results              |   2 +-
 scripts/generate-testresult-index.py |   2 +-
 scripts/run-config                   |   1 +
 scripts/summarize_top_output.py      | 176 +++++++++++++++++++++++++++
 4 files changed, 179 insertions(+), 2 deletions(-)
 create mode 100755 scripts/summarize_top_output.py
scripts/collect-results +1 -1
index 7474e36..7178380 100755
@@ -19,7 +19,7 @@ if [ -e $WORKDIR/buildhistory ]; then
 fi
 
 HSFILE=$WORKDIR/tmp/buildstats/*/host_stats
-d=`date +%Y-%m-%d--%H-%M`
+d="intermittent_failure_host_data"
 
 mkdir -p $DEST/$target/$d
 
scripts/generate-testresult-index.py +1 -1
index 7fdc17c..d85d606 100755
@@ -154,7 +154,7 @@ for build in sorted(os.listdir(path), key=keygen, reverse=True):
     hd = []
     counter = 0
     # do we really need the loop?
-    for p in glob.glob(buildpath + "/*/*/host_stats*top.txt"):
+    for p in glob.glob(buildpath + "/*/*/host_stats*top_summary.txt"):
         n_split = p.split(build)
         res = reldir[0:-1] + n_split[1]
         hd.append((res, str(counter)))
scripts/run-config +1 -0
index 8ed88cf..82de91f 100755
@@ -327,6 +327,7 @@ elif args.phase == "finish" and args.stepname == "collect-results":
     if args.results_dir:
         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])
     sys.exit(0)
 
 if jcfg:
scripts/summarize_top_output.py new file +176 -0

176 lines not on this page · raw message

Signature · 1 line
2.25.1