Function prometheus_http_query::functions::resets [−][src]
pub fn resets(vector: RangeVector) -> InstantVector
Expand description
Apply the PromQL resets
function.
use prometheus_http_query::{Selector, RangeVector}; use prometheus_http_query::functions::resets; use std::convert::TryInto; fn main() -> Result<(), prometheus_http_query::Error> { let vector: RangeVector = Selector::new() .metric("some_metric")? .with("some_label", "some_value") .range("5m")? .try_into()?; let result = resets(vector); assert_eq!(&result.to_string(), "resets(some_metric{some_label=\"some_value\"}[5m])"); Ok(()) }