|
@@ -8,6 +8,15 @@
|
|
# Outputs trace.tex (and the files pdflatex builds, including the target
|
|
# Outputs trace.tex (and the files pdflatex builds, including the target
|
|
# trace.pdf) into the log directory
|
|
# trace.pdf) into the log directory
|
|
|
|
|
|
|
|
+# Timescale (cm per second)
|
|
|
|
+timescale = .5
|
|
|
|
+
|
|
|
|
+# Nodescale (cm between nodes)
|
|
|
|
+nodescale = 1
|
|
|
|
+
|
|
|
|
+# Seconds between time label ticks
|
|
|
|
+time_tick = 2
|
|
|
|
+
|
|
import glob
|
|
import glob
|
|
import os
|
|
import os
|
|
import re
|
|
import re
|
|
@@ -76,6 +85,8 @@ for nodelog in nodelogs:
|
|
elif typ == 'complete':
|
|
elif typ == 'complete':
|
|
typ = 'F'
|
|
typ = 'F'
|
|
labels[node].append((tsf, typ))
|
|
labels[node].append((tsf, typ))
|
|
|
|
+ if min_ts is None or min_ts > tsf:
|
|
|
|
+ min_ts = tsf
|
|
if max_ts is None or max_ts < tsf:
|
|
if max_ts is None or max_ts < tsf:
|
|
max_ts = tsf
|
|
max_ts = tsf
|
|
elif matches := re.match(
|
|
elif matches := re.match(
|
|
@@ -102,6 +113,8 @@ for nodelog in nodelogs:
|
|
elif typ == 'End':
|
|
elif typ == 'End':
|
|
typ = 'W'
|
|
typ = 'W'
|
|
labels[node].append((tsf, typ))
|
|
labels[node].append((tsf, typ))
|
|
|
|
+ if min_ts is None or min_ts > tsf:
|
|
|
|
+ min_ts = tsf
|
|
if max_ts is None or max_ts < tsf:
|
|
if max_ts is None or max_ts < tsf:
|
|
max_ts = tsf
|
|
max_ts = tsf
|
|
elif matches := re.match(
|
|
elif matches := re.match(
|
|
@@ -159,15 +172,6 @@ for nodelog in nodelogs:
|
|
|
|
|
|
# Write a latex file that draws the messages
|
|
# Write a latex file that draws the messages
|
|
|
|
|
|
-# Timescale (cm per second)
|
|
|
|
-timescale = 2
|
|
|
|
-
|
|
|
|
-# Nodescale (cm between nodes)
|
|
|
|
-nodescale = 1
|
|
|
|
-
|
|
|
|
-# Seconds between time label ticks
|
|
|
|
-time_tick = 1
|
|
|
|
-
|
|
|
|
with open("trace.tex", "w") as tf:
|
|
with open("trace.tex", "w") as tf:
|
|
print(r'''\documentclass{article}
|
|
print(r'''\documentclass{article}
|
|
\usepackage[paperwidth=%fcm,paperheight=%fcm,margin=1cm]{geometry}
|
|
\usepackage[paperwidth=%fcm,paperheight=%fcm,margin=1cm]{geometry}
|