Make timestamp_to_csv work with multiple boots
The old code used a starting monotonic time to sync all the data on the
same plot. This doesn't work when reboots are at play. Rather than
fight that, use the distributed clock for everything.
Rather than push the concept of the distributed clock into the timestamp
filter, pull the concept of logging CSV files completely into the
multinode filter code. This actually simplifies things a fair amount.
The next step is to take this beautiful set of boot/time correspondances
and plumb it into the simulation code.
Change-Id: Id9336d683a13dd214eeec3af883d0f38a4cfa711
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/events/logging/timestamp_plot.gnuplot b/aos/events/logging/timestamp_plot.gnuplot
index 94ef7e4..1028948 100755
--- a/aos/events/logging/timestamp_plot.gnuplot
+++ b/aos/events/logging/timestamp_plot.gnuplot
@@ -9,9 +9,7 @@
print "Node1: ", node1
print "Node2: ", node2
-node1_start_time = system("grep " . node1 . " /tmp/timestamp_noncausal_starttime.csv | awk '{print $2}'") + 0
node1_index = int(system("grep -n " . node1 . " /tmp/timestamp_noncausal_starttime.csv | sed 's/:.*//'")) + 1
-node2_start_time = system("grep " . node2 . " /tmp/timestamp_noncausal_starttime.csv | awk '{print $2}'") + 0
node2_index = int(system("grep -n " . node2 . " /tmp/timestamp_noncausal_starttime.csv | sed 's/:.*//'")) + 1
noncausalfile12 = sprintf("/tmp/timestamp_noncausal_%s_%s.csv", node1, node2)
@@ -32,7 +30,7 @@
samplefile21 using 1:(-$2) title 'sample 2-1', \
noncausalfile12 using 1:3 title 'nc 1-2' with lines, \
noncausalfile21 using 1:(-$3) title 'nc 2-1' with lines, \
- offsetfile using ((column(node1_index) - node1_start_time + (column(node2_index) - node2_start_time)) / 2):(column(node2_index) - column(node1_index)) title 'filter 2-1' with linespoints
+ offsetfile using 1:(column(node2_index) - column(node1_index)) title 'filter 2-1' with linespoints
if (ARG3 ne "" ) {
exit