Struct prometrics::metrics::SummaryBuilder
[−]
[src]
pub struct SummaryBuilder { /* fields omitted */ }
Summary
builder.
Methods
impl SummaryBuilder
[src]
pub fn new(name: &str, window: Duration) -> Self
[src]
Makes a builder for summary named name
.
ⓘImportant traits for &'a mut Wpub fn namespace(&mut self, namespace: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the namespace part of the metric name of this.
ⓘImportant traits for &'a mut Wpub fn subsystem(&mut self, subsystem: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the subsystem part of the metric name of this.
ⓘImportant traits for &'a mut Wpub fn help(&mut self, help: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Sets the help of this.
ⓘImportant traits for &'a mut Wpub fn label(&mut self, name: &str, value: &str) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds a label.
Note that name
will be validated in the invocation of the finish
method.
The name "quantile"
is reserved for designating summary quantiles.
ⓘImportant traits for &'a mut Wpub fn registry(&mut self, registry: Registry) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds a registry to which the resulting histograms will be registered.
ⓘImportant traits for &'a mut Wpub fn default_registry(&mut self) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds the default registry.
ⓘImportant traits for &'a mut Wpub fn quantile(&mut self, quantile: f64) -> &mut Self
[src]
ⓘImportant traits for &'a mut W
Adds a quantile.
pub fn finish(&self) -> Result<Summary>
[src]
Builds a summary.
Errors
This method will return Err(_)
if one of the following conditions is satisfied:
- Any of the name of the metric or labels is malformed
- There is a quantile whose value is less than
0.0
or greater than1.0