Struct google_api_proto::google::monitoring::dashboard::v1::Aggregation
source · pub struct Aggregation {
pub alignment_period: Option<Duration>,
pub per_series_aligner: i32,
pub cross_series_reducer: i32,
pub group_by_fields: Vec<String>,
}
Expand description
Describes how to combine multiple time series to provide a different view of the data. Aggregation of time series is done in two steps. First, each time series in the set is aligned to the same time interval boundaries, then the set of time series is optionally reduced in number.
Alignment consists of applying the per_series_aligner
operation
to each time series after its data has been divided into regular
alignment_period
time intervals. This process takes all of the data
points in an alignment period, applies a mathematical transformation such as
averaging, minimum, maximum, delta, etc., and converts them into a single
data point per period.
Reduction is when the aligned and transformed time series can optionally be
combined, reducing the number of time series through similar mathematical
transformations. Reduction involves applying a cross_series_reducer
to
all the time series, optionally sorting the time series into subsets with
group_by_fields
, and applying the reducer to each subset.
The raw time series data can contain a huge amount of information from multiple sources. Alignment and reduction transforms this mass of data into a more manageable and representative collection of data, for example “the 95% latency across the average of all tasks in a cluster”. This representative data can be more easily graphed and comprehended, and the individual time series data is still available for later drilldown. For more details, see Filtering and aggregation.
Fields§
§alignment_period: Option<Duration>
The alignment_period
specifies a time interval, in seconds, that is used
to divide the data in all the
[time series][google.monitoring.v3.TimeSeries] into consistent blocks of
time. This will be done before the per-series aligner can be applied to
the data.
The value must be at least 60 seconds. If a per-series aligner other than
ALIGN_NONE
is specified, this field is required or an error is returned.
If no per-series aligner is specified, or the aligner ALIGN_NONE
is
specified, then this field is ignored.
The maximum value of the alignment_period
is 2 years, or 104 weeks.
per_series_aligner: i32
An Aligner
describes how to bring the data points in a single
time series into temporal alignment. Except for ALIGN_NONE
, all
alignments cause all the data points in an alignment_period
to be
mathematically grouped together, resulting in a single data point for
each alignment_period
with end timestamp at the end of the period.
Not all alignment operations may be applied to all time series. The valid
choices depend on the metric_kind
and value_type
of the original time
series. Alignment can change the metric_kind
or the value_type
of
the time series.
Time series data must be aligned in order to perform cross-time
series reduction. If cross_series_reducer
is specified, then
per_series_aligner
must be specified and not equal to ALIGN_NONE
and alignment_period
must be specified; otherwise, an error is
returned.
cross_series_reducer: i32
The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.
Not all reducer operations can be applied to all time series. The valid
choices depend on the metric_kind
and the value_type
of the original
time series. Reduction can yield a time series with a different
metric_kind
or value_type
than the input time series.
Time series data must first be aligned (see per_series_aligner
) in order
to perform cross-time series reduction. If cross_series_reducer
is
specified, then per_series_aligner
must be specified, and must not be
ALIGN_NONE
. An alignment_period
must also be specified; otherwise, an
error is returned.
group_by_fields: Vec<String>
The set of fields to preserve when cross_series_reducer
is
specified. The group_by_fields
determine how the time series are
partitioned into subsets prior to applying the aggregation
operation. Each subset contains time series that have the same
value for each of the grouping fields. Each individual time
series is a member of exactly one subset. The
cross_series_reducer
is applied to each subset of time series.
It is not possible to reduce across different resource types, so
this field implicitly contains resource.type
. Fields not
specified in group_by_fields
are aggregated away. If
group_by_fields
is not specified and all the time series have
the same resource type, then the time series are aggregated into
a single output time series. If cross_series_reducer
is not
defined, this field is ignored.
Implementations§
source§impl Aggregation
impl Aggregation
sourcepub fn per_series_aligner(&self) -> Aligner
pub fn per_series_aligner(&self) -> Aligner
Returns the enum value of per_series_aligner
, or the default if the field is set to an invalid enum value.
sourcepub fn set_per_series_aligner(&mut self, value: Aligner)
pub fn set_per_series_aligner(&mut self, value: Aligner)
Sets per_series_aligner
to the provided enum value.
sourcepub fn cross_series_reducer(&self) -> Reducer
pub fn cross_series_reducer(&self) -> Reducer
Returns the enum value of cross_series_reducer
, or the default if the field is set to an invalid enum value.
sourcepub fn set_cross_series_reducer(&mut self, value: Reducer)
pub fn set_cross_series_reducer(&mut self, value: Reducer)
Sets cross_series_reducer
to the provided enum value.
Trait Implementations§
source§impl Clone for Aggregation
impl Clone for Aggregation
source§fn clone(&self) -> Aggregation
fn clone(&self) -> Aggregation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Aggregation
impl Debug for Aggregation
source§impl Default for Aggregation
impl Default for Aggregation
source§impl Message for Aggregation
impl Message for Aggregation
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Aggregation
impl PartialEq for Aggregation
source§fn eq(&self, other: &Aggregation) -> bool
fn eq(&self, other: &Aggregation) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Aggregation
Auto Trait Implementations§
impl Freeze for Aggregation
impl RefUnwindSafe for Aggregation
impl Send for Aggregation
impl Sync for Aggregation
impl Unpin for Aggregation
impl UnwindSafe for Aggregation
Blanket Implementations§
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
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request