Handle log files with only one direction of data
We have seen some log files where A -> B works, but B -> A hasn't
started up yet when interesting things are happening in the log. There
is enough information to order events causally between nodes, though not
well. So, use this information to fit what we have.
This doesn't yet handle transitioning between not having both directions
and having both directions. Both of those behaviors should result in a
jump in time and therefore a crash.
Change-Id: I684c1b61eb18efe2caaedc0e1e86f147c1e30f70
diff --git a/aos/events/logging/logger.cc b/aos/events/logging/logger.cc
index b16ea6f..24c0427 100644
--- a/aos/events/logging/logger.cc
+++ b/aos/events/logging/logger.cc
@@ -1424,8 +1424,6 @@
// which involves time before changing it. That especially includes
// sending the message.
if (update_time) {
- filters_->LogFit("");
-
VLOG(1) << MaybeNodeName(state->event_loop()->node())
<< "updating offsets";
@@ -1436,20 +1434,10 @@
return state->monotonic_now();
});
- for (size_t i = 0; i < states_.size(); ++i) {
- VLOG(1) << MaybeNodeName(states_[i]->event_loop()->node()) << "before "
- << states_[i]->monotonic_now();
- }
-
UpdateOffsets();
VLOG(1) << MaybeNodeName(state->event_loop()->node()) << "Now is now "
<< state->monotonic_now();
- for (size_t i = 0; i < states_.size(); ++i) {
- VLOG(1) << MaybeNodeName(states_[i]->event_loop()->node()) << "after "
- << states_[i]->monotonic_now();
- }
-
// TODO(austin): We should be perfect.
const std::chrono::nanoseconds kTolerance{3};
if (!FLAGS_skip_order_validation) {
@@ -1462,7 +1450,7 @@
<< MaybeNodeName(states_[i]->event_loop()->node());
CHECK_LE(states_[i]->monotonic_now(), before_times[i] + kTolerance)
<< ": Time changed too much on node "
- << states_[i]->event_loop()->node()->name()->string_view();
+ << MaybeNodeName(states_[i]->event_loop()->node());
}
} else {
if (next_time < state->monotonic_now()) {