Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 1 | include "aos/network/message_bridge_server.fbs"; |
| 2 | |
| 3 | namespace aos.message_bridge; |
| 4 | |
| 5 | // Statistics from a single client connection to a server. |
| 6 | table ClientConnection { |
| 7 | // The node that we are connected to. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 8 | node:Node (id: 0); |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 9 | |
| 10 | // Health of this connection. Connected or not? |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 11 | state:State (id: 1); |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 12 | |
| 13 | // Number of packets received on all channels. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 14 | received_packets:uint (id: 2); |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 15 | |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 16 | // 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 Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 19 | monotonic_offset:int64 (id: 3); |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 20 | |
Austin Schuh | 4889b18 | 2020-11-18 19:11:56 -0800 | [diff] [blame] | 21 | // Number of duplicate packets we received and dropped. |
| 22 | duplicate_packets:uint (id: 4); |
| 23 | |
Austin Schuh | e61d438 | 2021-03-31 21:33:02 -0700 | [diff] [blame] | 24 | // Number of extra calls needed to receive a single message |
| 25 | // (indicates congestion) |
| 26 | partial_deliveries:uint (id: 5); |
| 27 | |
Austin Schuh | 367a7f4 | 2021-11-23 23:04:36 -0800 | [diff] [blame] | 28 | // 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 Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | // Statistics for all clients. |
| 41 | table ClientStatistics { |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 42 | connections:[ClientConnection] (id: 0); |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | root_type ClientStatistics; |