blob: ec25371ce7695a063e69b8b84a37073fbb195dca [file]
edition = "2023";
package milotic_hft;
enum AggregationColor {
// IMPORTANT: keep the numbers consecutive:
COLOR_UNSPECIFIED = 0;
COLOR_GREEN = 1;
COLOR_YELLOW = 2;
COLOR_RED = 3;
reserved 4, 5;
COLOR_MAX = 6;
}
// Bucket of values, value_range_start <= value < value_range_end.
message AggregationBucketConfiguration {
// bucket range start (greater than equal to):
float value_range_start = 1;
// bucket range end (less than):
float value_range_end = 2;
// bucket color:
AggregationColor bucket_color = 3;
reserved 4, 5, 6;
// threshold count high above which the event is triggered:
int32 threshold_count_high = 7;
// whether to export raw readings for this bucket:
bool is_export_raw_readings = 8;
}
message AggregationBucket {
// Telemetry source id:
string telemetry_source = 1;
// bucket configuration:
AggregationBucketConfiguration bucket_config = 2;
// current bucket count:
int64 current_count = 5;
}
message AggregationWindowConfiguration {
// window duration in milliseconds: (default is 1000)
int32 window_duration_ms = 1 [default = 1000]; // (must be >= 1000ms)
// number of windows to keep in memory: (default is 2)
int32 window_number = 2 [default = 2]; // (must be >= 2)
// aggregation bucket configurations:
repeated AggregationBucketConfiguration bucket_configuration = 3;
}
message AggregationWindow {
reserved 1;
// window aggregation timestamp start:
int64 timestamp_start_ms = 2;
// window aggregation timestamp end:
int64 timestamp_end_ms = 3;
// window buckets:
repeated AggregationBucket buckets = 4;
reserved 5, 6, 7, 8, 9, 10;
// last determined and reported bucket color in this window:
AggregationColor window_bucket_color = 11;
// last determined and reported bucket index into `buckets` above in this
// window:
int32 window_bucket_index = 12;
}
message AggregationConfiguration {
// The type of event that triggers the export of aggregation results:
enum AggregationEventType {
AGGREGATION_EVENT_TYPE_UNSPECIFIED = 0;
AGGREGATION_EVENT_TYPE_ON_CHANGE = 1;
AGGREGATION_EVENT_TYPE_PERIODIC = 2;
}
// TODO(haimg): not implemented yet - pending implementation.
AggregationEventType aggregation_event_type = 1;
// The interval at which aggregation results are exported
// (AGGREGATION_EVENT_TYPE_PERIODIC)
// TODO(haimg): not implemented yet - pending implementation.
int32 aggregation_periodic_export_interval_ms = 2;
reserved 3, 4, 5, 6, 7, 8, 9, 10;
// aggregation window configuration:
AggregationWindowConfiguration window_configuration = 11;
}