blob: 40c0698b45f3edb4a6b39af2da9283427f32f22e [file] [log] [blame]
Austin Schuhe84c3ed2019-12-14 15:29:48 -08001include "aos/network/message_bridge_server.fbs";
2
3namespace aos.message_bridge;
4
5// Statistics from a single client connection to a server.
6table ClientConnection {
7 // The node that we are connected to.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -08008 node:Node (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -08009
10 // Health of this connection. Connected or not?
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080011 state:State (id: 1);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080012
13 // Number of packets received on all channels.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080014 received_packets:uint (id: 2);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080015
Austin Schuh7bc59052020-02-16 23:48:33 -080016 // This is the measured monotonic offset for just the server -> client
17 // direction measured in nanoseconds. Subtract this from our monotonic time
18 // to get their monotonic time.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080019 monotonic_offset:int64 (id: 3);
Austin Schuh7bc59052020-02-16 23:48:33 -080020
Austin Schuh4889b182020-11-18 19:11:56 -080021 // Number of duplicate packets we received and dropped.
22 duplicate_packets:uint (id: 4);
23
Austin Schuhe61d4382021-03-31 21:33:02 -070024 // Number of extra calls needed to receive a single message
25 // (indicates congestion)
26 partial_deliveries:uint (id: 5);
27
Austin Schuh367a7f42021-11-23 23:04:36 -080028 // Boot UUID of the server.
29 boot_uuid:string (id: 6);
30
31 // Time at which we connected to the server as nanoseconds on the local
32 // monotonic clock. This is not populated when not connected, and defaults
33 // to monotonic_clock::min_time.
34 connected_since_time:int64 = -9223372036854775808 (id: 7);
35
36 // Number of times we've established a connection to the server.
37 connection_count:uint (id: 8);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080038}
39
40// Statistics for all clients.
41table ClientStatistics {
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080042 connections:[ClientConnection] (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080043}
44
45root_type ClientStatistics;