add a log table
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Fri, 17 Oct 2025 16:03:27 +0000 (18:03 +0200)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Fri, 17 Oct 2025 16:03:27 +0000 (18:03 +0200)
addlogdate.sh [new file with mode: 0755]
generatedoc.sh
getdate.awk [new file with mode: 0755]
rawmeasures.gp
readme.md

diff --git a/addlogdate.sh b/addlogdate.sh
new file mode 100755 (executable)
index 0000000..3a52f75
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+base=$(cd $(dirname $0); pwd)
+
+echo "<h2>Simulation logs</h2>"
+
+echo "<table border=\"1\" cellpadding=\"5\" cellspacing=\"2\" width=\"100%\">"
+echo "<thead><tr><th>Test</th><th width=\"12%\">Dedicated<br>core(s)</th><th width=\"12%\">Load<br>(%)</th><th>Start date</th><th>End date</th></tr></thead>"
+
+echo "<tbody>"
+
+for log; do
+  $base/getdate.awk $log | awk 'NR != 1 {gsub(/,/, "</td><td>"); print "<tr><td>" $0 "</td></tr>"}' 
+done
+
+echo "</tbody>"
+echo "</table>"
index 3ebfaea37611be987c3235c60073315572156974..538752f2c09ceaaeef15c6aa1f6a39eae92be5ed 100755 (executable)
@@ -41,6 +41,6 @@ for tab; do
 
 done
 
-echo "<p>.</p>
+echo "<p>.</p>"
 echo "</body>"
 echo "</html>"
diff --git a/getdate.awk b/getdate.awk
new file mode 100755 (executable)
index 0000000..009b233
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/awk -f
+
+BEGIN {
+    OFS=","
+    if (!nohead) {
+        print "Test", "Dedicated core(s)", "Load (%)", "Start date", "End date"
+    }
+    start = ""
+}
+
+/Test:/ {
+    sub (/^[^ ]* /, "")
+    test=$0
+}
+
+{ sub (/us$/, "") }
+
+/Dedicated/ { dcore=$3 }
+/CPU load/ { load=$3 }
+
+/UTC/ {
+    if (start == "") {
+        start = $0
+    } else {
+        print test, dcore, load, start, $0
+        start = ""
+    }
+}
index 2afda022f4b4bf6dee8f2008edbecec32150b5bc..38e17e582f83885af60e61cf4c63526ccdf4be37 100644 (file)
@@ -13,7 +13,7 @@ set format y "%.1f"
 f(x) = x / 1000
 
 set style data line
-plot [:] [0:] data using (f($1)) notitle
+plot [-5:] [0:] data using (f($1)) notitle
 
 #pause 5 "please wait 5s"
 
index 9ec2a9e008023c42fd6bf02f33f75d5ebec71442..f0e29ac6dc4d1c166672d1e4859810cf1490c608 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -49,6 +49,13 @@ Extract data into a new directory
 ## Generate report
 
   ../generatedoc.sh *.tab > report.html
+  ../addlogdate.sh *.log > date.html
+  sed -i '/<p>\.<\/p>/ r date.html' report.html
+  sed -i '/<p>\.<\/p>/ d' report.html
   #libreoffice --convert-to odt report.html
   LANG=C pandoc report.html -t odt -o report.odt
   libreoffice --convert-to doc report.odt
+
+## Date
+
+  for f in result.ods report.doc; do mv $f ${f/./-$(date +%Y%m%d).}; done