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 | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 28 | // TODO(austin): Per channel counts? |
| 29 | } |
| 30 | |
| 31 | // Statistics for all clients. |
| 32 | table ClientStatistics { |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 33 | connections:[ClientConnection] (id: 0); |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | root_type ClientStatistics; |