blob: c0aaf19842f8db112bebf035b0b48e91004ac015 [file] [log] [blame]
include "aos/configuration.fbs";
namespace aos.timing;
// Enum indicating why a message failed to send.
enum SendError : byte {
// Messages were sent faster than allowed on a given channel.
MESSAGE_SENT_TOO_FAST = 0,
// The redzone for a message was invalid, implying some form of memory
// corruption.
INVALID_REDZONE = 1,
}
// Table used to track how many times a given error occurred.
table SendErrorCount {
error:SendError (id: 0);
count:uint (id: 1);
}
// Holds statistics for a time or size sample.
table Statistic {
average:float = nan (id: 0);
min:float = nan (id: 1);
max:float = nan (id: 2);
standard_deviation:float = nan (id: 3);
}
table Sender {
// Index into the channel config for this event loop.
channel_index:int = -1 (id: 0);
// Number of messages published.
count:uint (id: 1);
// Statistics on the size of messages published.
size:Statistic (id: 2);
// Counts of how often different errors occurred. There
// should be an entry for all possible errors, even if no errors occurred
// since the last timing report. The absence of an entry implies that the
// error in question was not supported when the log was generated.
error_counts:[SendErrorCount] (id: 4);
// Channel for this sender. Not filled out by default.
channel:Channel (id: 3);
}
table Watcher {
// Index into the channel config for this event loop.
channel_index:int = -1 (id: 0);
// Number of messages received since the last report.
count:uint (id: 1);
// Latency measurement from when the event was generated (send time), and when
// the handler was started.
wakeup_latency:Statistic (id: 2);
// Statistics on the execution time of the handler.
handler_time:Statistic (id: 3);
// Channel for this watcher. Not filled out by default.
channel:Channel (id: 4);
}
table Fetcher {
// Index into the channel config for this event loop.
channel_index:int = -1 (id: 0);
// Number of messages fetched since the last time this was published.
count:uint (id: 1);
// Latency measurement from when the event was generated (send time), and when
// the message was fetched.
latency:Statistic (id: 2);
// Channel for this fetcher. Not filled out by default.
channel:Channel (id: 3);
}
table Timer {
name:string (id: 0);
// Number of wakeups since the last report.
count:uint (id: 1);
// Latency measurement from when the event was generated (send time), and when
// the handler was started.
wakeup_latency:Statistic (id: 2);
// Statistics on the execution time of the handler.
handler_time:Statistic (id: 3);
// Maximum number of cycles missed.
}
table Report {
// Name of the event loop which is publishing this report.
name:string (id: 0);
// Identifier for the event loop. This should change every time a process
// gets restarted.
pid:int (id: 1);
// List of statistics for each watcher, sender, fetcher, timer, and
// phased loop.
watchers:[Watcher] (id: 2);
senders:[Sender] (id: 3);
fetchers:[Fetcher] (id: 4);
timers:[Timer] (id: 5);
phased_loops:[Timer] (id: 6);
// Total count of Report send failures
send_failures:uint64 (id: 7);
}
root_type Report;