pub struct BatchAggregation {
pub metric_id: String,
pub window_start: i64,
pub window_end: i64,
pub running_sum: f64,
pub running_count: i64,
pub min_value: f64,
pub max_value: f64,
pub schema: Arc<Schema>,
pub value_column: String,
pub group_by: GroupBy,
pub window: Option<TimeWindow>,
}Expand description
Batch-level aggregation state for efficient updates
Fields§
§metric_id: StringThe metric ID this aggregation belongs to
window_start: i64Start of the time window
window_end: i64End of the time window
running_sum: f64Running sum within the window
running_count: i64Running count within the window
min_value: f64Minimum value in the window
max_value: f64Maximum value in the window
schema: Arc<Schema>Schema for the aggregation
value_column: StringColumn to aggregate
group_by: GroupByGrouping specification
window: Option<TimeWindow>Time window specification
Implementations§
Source§impl BatchAggregation
impl BatchAggregation
pub fn new_window( metric_id: String, window_start: i64, window_end: i64, schema: Arc<Schema>, value_column: String, group_by: GroupBy, window: Option<TimeWindow>, ) -> Self
pub fn new_from_metric( metric_id: String, window_start: i64, window_end: i64, window: TimeWindow, ) -> Self
pub fn new( schema: Arc<Schema>, value_column: String, group_by: GroupBy, window: Option<TimeWindow>, ) -> Self
Trait Implementations§
Source§impl Clone for BatchAggregation
impl Clone for BatchAggregation
Source§fn clone(&self) -> BatchAggregation
fn clone(&self) -> BatchAggregation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchAggregation
impl RefUnwindSafe for BatchAggregation
impl Send for BatchAggregation
impl Sync for BatchAggregation
impl Unpin for BatchAggregation
impl UnsafeUnpin for BatchAggregation
impl UnwindSafe for BatchAggregation
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more