summaryrefslogtreecommitdiffstats
path: root/TOOLS/stats-conv.py
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/stats-conv.py')
-rwxr-xr-xTOOLS/stats-conv.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/TOOLS/stats-conv.py b/TOOLS/stats-conv.py
index 836e1e8421..bc77e3e32a 100755
--- a/TOOLS/stats-conv.py
+++ b/TOOLS/stats-conv.py
@@ -25,6 +25,8 @@ Currently, the following event types are supported:
'end' <name> end of the named event
'value' <float> <name> a normal value (as opposed to event)
'event-timed' <ts> <name> singular event at the given timestamp
+ 'value-timed' <ts> <float> <name>
+ a value for an event at the given timestamp
<name> singular event
"""
@@ -86,6 +88,12 @@ for line in [line.split("#")[0].strip() for line in open(filename, "r")]:
val = int(val) / 1000 - G.start
e = get_event(name, "event-signal")
e.vals.append((val, 1))
+ elif event.startswith("value-timed "):
+ _, tsval, val, name = event.split(" ", 3)
+ tsval = int(tsval) / 1000 - G.start
+ val = float(val)
+ e = get_event(name, "value")
+ e.vals.append((tsval, val))
else:
e = get_event(event, "event-signal")
e.vals.append((ts, 1))