Track message_bridge client UUID and connection counts and time
It is hard to tell from the status message if a node has been
reconnecting a bunch or how long it has been connected. Add both of
those numbers to both the client and server statistics.
While we are here, also add the server's boot UUID to the client.
Because of the way the protocol works, we only get this when the first
message is received, but that happens pretty quickly due to the
timestamps.
All of this should give us much better debugging around client/server
connections when things start to go south.
Change-Id: I2ed732afc81a045c7701fe47d1460a7df9c3d778
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/network/message_bridge_client.fbs b/aos/network/message_bridge_client.fbs
index 6efe3a9..40c0698 100644
--- a/aos/network/message_bridge_client.fbs
+++ b/aos/network/message_bridge_client.fbs
@@ -25,7 +25,16 @@
// (indicates congestion)
partial_deliveries:uint (id: 5);
- // TODO(austin): Per channel counts?
+ // Boot UUID of the server.
+ boot_uuid:string (id: 6);
+
+ // Time at which we connected to the server as nanoseconds on the local
+ // monotonic clock. This is not populated when not connected, and defaults
+ // to monotonic_clock::min_time.
+ connected_since_time:int64 = -9223372036854775808 (id: 7);
+
+ // Number of times we've established a connection to the server.
+ connection_count:uint (id: 8);
}
// Statistics for all clients.